You could add CHECK constraint
Code Snippet
createtable test
(
id int,
valueint
)
altertable test addconstraint chk_possible check(valuein(1,2,3))
insertinto test values(1,1)--Works
insertinto test values(1,7)--Fail
You could add CHECK constraint
Code Snippet
createtable test
(
id int,
valueint
)
altertable test addconstraint chk_possible check(valuein(1,2,3))
insertinto test values(1,1)--Works
insertinto test values(1,7)--Fail
Sql Case sensitivity,sql server
No comments:
Post a Comment