[thelist] re: mysql - table formats?

MarsHall evolt at marsorange.com
Thu Nov 14 14:33:01 CST 2002


On Thursday, Nov 14, 2002, at 14:20 US/Central, Tom Dell'Aringa wrote:
> I chose decimal (based on that very page.) Now I want a true/false
> field but I cannot find boolean in the documentation for column
> types! Is it under a different name? I can't believe there isn't a
> boolean type..

A column of type CHAR(1) or INT(1) is synonymous with BOOL.

Just store 1 or 0 for TRUE or FALSE. I think most SQL engines will
automagically transform the constants TRUE and FALSE to 1 and 0 anyway.

Mars :)




More information about the thelist mailing list