from the manual it appears that "char(0) null default null" can be
used as a boolean, will the values of either null or "". haven't
tried it myself, but its documented.
[NATIONAL] CHAR(M) [BINARY | ASCII | UNICODE]
This is also quite nice when you need a column that only can
take 2 values: A CHAR(0), that is not defined as NOT NULL, will only
occupy one bit and can only take 2 values: NULL or "". See section
188.8.131.52 The CHAR and VARCHAR Types.
On Wednesday 03 March 2004 11:43, Curtis Maurand wrote:
> someflag enum('TRUE','FALSE');
> Not quite boolean, but it works.
> On Wed, 3 Mar 2004, Mark Warner wrote:
> > The thing which bothers me most about MySQL is the lack of a
> > proper boolean. I don't like having to abstract a tinyint(1) into
> > true or false. As much of my work involves building applications
> > with Yes or No questions, I think I am switching to PostgreSQL.
> > david.best@stripped wrote:
> > >>What advantages, besides ease of setup, does MySQL hold over
> > >> PostgreSQL? It would seem, to me, that the two are close
> > >> competitors (both in quality, and performance).
> > >
> > >Are you sure about quality? Check out:
> > >
> > >http://sql-info.de/mysql/gotchas.html
> > >
> > >You can check out postgresql's on the same site but they are
> > > significally less critical. After reviewing this and talking
> > > to some other people i'm switching over to postgresql. I'm
> > > sure there is a place with mysql but I don't think i'd trust it
> > > for anything critical unless you very confident your developers
> > > know what they are doing.