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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Check Age Range

Author  Topic 

SmirnoffKid
Starting Member

10 Posts

Posted - 2005-12-14 : 17:59:02
I am creating a table that will check the age range for an attribute called Age. I am experiencing trouble when I run the code. Am I writing this code correctly?

check (Customer_Age in (>= '15' and <='100')),

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2005-12-14 : 18:06:12
I believe the Customer_Age should be in numeric field and not char ?
CHECK (Customer_Age >= 15 and Customer_Age <= 100)


-----------------
[KH]

Learn something new everyday
Go to Top of Page
   

- Advertisement -