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

python - Setting ctypes.Structure default values -

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

java - HTTP Status 500 - No data type for node: org.hibernate.hql.internal.ast.tree.IdentNode -