Why not use ENUM?
create table test
bool ENUM('t', 'f') default 't' not null,
val1 char(15),
val2 int
...
...
It will "map" T to a 0 and F to 1. It's nearly identical to what
you're doing, but it may seem more intuitive to some.
Cheers,
Chris Oson
-----Original Message-----
From: Scott Baker [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 16, 2001 11:05 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: What type of a Column for "True" or "False"?
I wish MySQL had a boolean datatype for this exact reason. Unfortunately
it doesn't, so for all the times I've needed on I've just used a "Tinyint"
and set 0 to false, and -1 (or 1) to true.
At 05:41 PM 1/16/2001 +0000, SED wrote:
>Hi, I'm new to MySQL and I want to create a column which only needs to
>include "True" or "False" statement, but I'm not sure what type of a column
>I should use. Can you give me a hint? I have read the manual but it was not
>enough to convince me.
>
>Regards,
>Sumarlidi Einar Dadason
>
>SED - Graphic Design
>
>------------------------------------------
>Phone: (+354) 4615501
>Mobile: (+354) 8960376
>Fax: (+354) 4615503
>E-mail: [EMAIL PROTECTED]
>Homepage: www.sed.is <- New Homepage!
>------------------------------------------
>
>
>---------------------------------------------------------------------
>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
-------------------------------------
Scott Baker - Webster Internet - Network Technician
503.266.8253 - [EMAIL PROTECTED]
"Always bear in mind that your own resolution to success is more important
than any other one thing." - Abraham Lincoln
---------------------------------------------------------------------
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
---------------------------------------------------------------------
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