How do I put a constraint on a column so that it can only contain the following values? What do you call this type of constraint?
Allowed values: \"yes\", \"no\"
you can use a CHECK constraint
ALTER TABLE ADD CONSTRAINT chk_val CHECK (col in ('yes','no','maybe')) MSDN link 0 讨论(0) 查看其它3个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复 热议问题
MSDN link