Jordan Elver writes:
> Hi, > If I wanted to define a table to have a cloumn which is either yes or no for > example. Would it be better to use a single char (0 or 1), or can I use an > enum (I find them more friendly ;)). If you use an enum you might end up with the value '' if you enter something invalid, whereas if you use a tinyint(1) the worst thing you can get is a number outside {0,1}. If you use a char you'll have all sorts of conversion problems when using the column in boolena expressions, not to mention that there are lots of funny values permitted. I use tinyint(1) in all places where I need a boolean, and it works fine for me. I've seen rumors about bool being an alias for tinyint(1), but it's not in the manual and I haven't tested it. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. --------------------------------------------------------------------- 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