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

c++ - list<myClass<int> * > sort -

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

java - why am i getting a "cannot resolve method" error on getApplication? -