dumb question

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
news [ Sa, 29 September 2007 02:43 ] [ ID #1832227 ]

Re: dumb question

>> 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.
Joe Celko [ Sa, 29 September 2007 02:55 ] [ ID #1832229 ]

Re: dumb question

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.

--
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]


"news" <wjfwjr [at] hotmail.com> wrote in message
news:eZOdnUO6lMk4AmDbnZ2dnUVZ_oCvnZ2d [at] comcast.com...
> 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
>
>
>
Tony Rogerson [ Sa, 29 September 2007 11:20 ] [ ID #1832238 ]
Datenbanken » comp.databases.ms-sqlserver » dumb question

Vorheriges Thema: Apparent DB engine bug in SQL Server 2005
Nächstes Thema: find unique identifier through multiple tables