> > How can I set the domain of a attribute to a boolean value?
>
> OK, I'm not entirely clear with your terminology, but I think
> you're asking
> "how do I define a field as a boolean"...
>
> MySQL doesn't provide a boolean datatype as such, but in my experience the
> best way to handle it is to define a field as a smallint and use
> 1 for true
> and 0 for false.

http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#Num
eric_types

MySQL does offer a boolean substitute, also smallint is a bit big for a
true/false column.

BOOL
or
tinyint(1) unsigned

would probably be your best options for a boolean column need.

Sincerely,

Craig Vincent



---------------------------------------------------------------------
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