If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > what datatype to use for boolean valued column (was "A Beginners doubt")

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-09-05, 11:57
baskar007 baskar007 is offline
Registered User
 
Join Date: Dec 2004
Posts: 6
what datatype to use for boolean valued column (was "A Beginners doubt")

Hi all,
I'am new to DB design.
And recently started a DB design.
I want to have a boolean valued column.
I'am not sure of which SQL data type to be selected.
I read in an article that, 'bit' datatype is not
supported in some DBs. So, I'am not sure - whether
I can select 'int' datatype - which is more common.

I know - its simple question for experienced people
in the forum.

It'll be nice if some one can help me out on that.

Thanks in advance.
Reply With Quote
  #2 (permalink)  
Old 03-09-05, 13:01
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,085
INTEGER would be too big, SMALLINT would be better

my own preference is CHAR(1) which is universally supported
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 03-10-05, 01:39
baskar007 baskar007 is offline
Registered User
 
Join Date: Dec 2004
Posts: 6
Thanks a lot
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On