List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:September 21 1999 3:12am
Subject:Re: boolean values?
View as plain text  
At 10:06 PM -0500 9/20/99, Martin Ramsch wrote:
>On Mon, 1999-09-20 09:56:51 -0700, Nathan Clegg wrote:
>> I noticed that 'bool' is a reserved word, but that there are no
>> boolean column types.  Is tinyint the most efficient way to store a
>> single boolean value?
>IMHO yes!  Only ENUM with up to 256 values, e.g.  ENUM('Y','N'), is
>equally good and only needs 1 byte, too.

As of MySQL, you can also use CHAR(0) to store boolean values.  Declare
it NULL, and the column can be either NULL or the empty string (in effect,

It's very efficient in terms of storage. :-)

Paul DuBois, paul@stripped
boolean values?Nathan Clegg20 Sep
  • Re: boolean values?Martin Ramsch21 Sep
    • Re: boolean values?Paul DuBois21 Sep
    • Re: boolean values?Paul DuBois21 Sep
  • boolean values?Michael Widenius22 Sep