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
 Data Type

Author  Topic 

shapper
Constraint Violating Yak Guru

450 Posts

Posted - 2007-01-31 : 19:30:28
Hello,

I want to create a table column which will hold only a number from 0 to 9. What type should I use?

Thanks,
Miguel

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2007-01-31 : 19:33:48
You can use a TINYINT NOT NULL, and then add a check constraint to limit the values to the range of 0 to 9.



CODO ERGO SUM
Go to Top of Page
   

- Advertisement -