• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Value Lists

  • Thread starter Thread starter SandyDown
  • Start date Start date
S

SandyDown

Guest
Reb .. sorry another silly questions... if I have to write an insert statement where by one of the values can be only one of a list given (i.e. can't be any varchar) how do I write that statement...

e.g normal insert statement

INSERT INTO table X (one,two,three)
VALUES (1,2,3)


but what if column 3 can be only one of a chosen list and no other values are allowed very similar to boolean you can only choose Yes or No ... but in this case a value for column three can be only one of the set {AA, BB, AB, ABC} ... hence if somone wanted to insert ACB they wont be allowed to and there would be an error .... hope I explained this right !!!
 

Advertisers

Back
Top