SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Boolean Data Type?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

DavidChel
Constraint Violating Yak Guru

USA
474 Posts

Posted - 04/22/2008 :  10:36:30  Show Profile  Reply with Quote
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

Sweden
30281 Posts

Posted - 04/22/2008 :  10:40:01  Show Profile  Visit SwePeso's Homepage  Reply with Quote
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

USA
474 Posts

Posted - 04/22/2008 :  10:45:08  Show Profile  Reply with Quote
Thanks Peso.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 04/22/2008 :  10:45:53  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.07 seconds. Powered By: Snitz Forums 2000