Hello Christopher!

On Tue, 13 Nov 2001, Christian Stromberger wrote:

> Is a boolean column type possible in mysql?  If not, what's the most common
> column type for true/false (or true/false/null) flags?

TINYINT works fine, set it to a 0 or a 1. It takes just one byte. Any
programming language that offers a generic boolean type uses a byte
anyway.

Or you can use a CHAR(1) and set it to Y,y/N,n, but string comparison
structures are more annoying. Very useful though if
'human/non-binary-aware' users have to deal with the data and you don't
want to bother converting the 0 to No and 1 to Yes.

Or you can use ENUM with Y or yes, and N or No. Again, more annoying to
write than TINYINT but more human-readable.

Have a :) day!

jb

-- 
jim barchuk
[EMAIL PROTECTED]


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to