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

Author  Topic 

DavidChel
Constraint Violating Yak Guru

474 Posts

Posted - 2008-04-22 : 10:36:30
I know this is a stupid question, but I've searched and can't seem to find it.

What do you use in SQL when creating a table and the field is a "yes/no" type field? In VB isn't that a boolean data type? What is the corresponding SQL data type?

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-04-22 : 10:40:01
BIT.

0 is false, all other values evaluates to 1 which means true.
And there can eventually also be NULL (not known).



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

DavidChel
Constraint Violating Yak Guru

474 Posts

Posted - 2008-04-22 : 10:45:08
Thanks Peso.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2008-04-22 : 10:45:53
He's so helpful

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page
   

- Advertisement -