sql server 2008 - Prevent table from adding more than a row -


in way of implementing configuration table, table suppose have 1 row @ time.

is there way in sql server 2008 prevent table adding more row?

any ideas?

add static, computed, column , make unique.

alter table mytable add uniquekey 1 persisted constraint uq_mytable_uniquekey unique 

if adds row, cause unique constraint violation


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -