Hi All! I'm new to SQL Server.
Is there anyway to program list values for a field(s) for insert operations a-la MS Access field value lists?
Thanks for your help!
You can write a constraint or trigger to check the values. The constraint is the better choice (more efficient) unless you are doing complex processing to check the correctness of the values.
Look up constraints in Books Online.
It is also a good idea to do a check for correct values on the client side to avoid sending unnecessary traffic across the network. IN fact if I have specific values, I will put them in a lookup table that popultes a list box or combo box, so that bad values cannot be selected for data entry. The table should still have the constraint on it though, because people do occasionally enter data directly in the tables without using the user interface.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.