Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jcmoon
Starting Member
1 Post |
Posted - 2011-10-13 : 12:25:30
|
| Hi!I'm new to SQL server 2008, and database design in general....I want to design a table, having one of the fields validate on one of three string values: opt, req, or nais there a way to define a user defined type, which only excepts one of those values?thanks!james moon |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-13 : 12:27:58
|
| you need to add a check constraint on it likeALTER TABLE <table name> ADD CONSTRAINT Chk_<Columnname> CHECK (Column IN ('opt','req','na'))------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|