Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / General / Other SQL Server Topics / September 2007

Tip: Looking for answers? Try searching our database.

dumb question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
news - 29 Sep 2007 01:43 GMT
Sorry about this. But I've worked primarily in access for years.

Does SQL Server have a boolean or  a yes/no data type for its table columns?

Thanks in advance,

Bill
--CELKO-- - 29 Sep 2007 01:55 GMT
>> Does SQL Server have a boolean or a yes/no data type for its table columns? <<

No, and you should not write SQL that way -- bit flags are too low
level for a high level language.  We left BOOLEANs out for good
reasons having to do with 3VL, NULLs and consistent language model.
Tony Rogerson - 29 Sep 2007 10:20 GMT
Hi Bill,

No it doesn't, people usually use the BIT data type which holds 0 or 1; some
folk like myself use Y or N / T or F in a char(1) column.

Tony.

Signature

Tony Rogerson, SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson
[Ramblings from the field from a SQL consultant]
http://sqlserverfaq.com
[UK SQL User Community]

> Sorry about this. But I've worked primarily in access for years.
>
[quoted text clipped - 4 lines]
>
> Bill
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.