Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Plain Text by grizzly ( 15 years ago )
-- Posted by stephen bond on February 23 2010 6:06pm
bool deafulting to tinyint is not strict enough. if you really want bool type you should use type "bit(1)" which will allow you to use exactly 1 and 0 and maybe save space or use type "enum('T','F')" which will not save space but make it a true binary flag.
-- Posted by Miroslav Sustek on October 29 2010 3:22pm
Be careful when considering ENUM('T','F') as "true binary".
Example:
CREATE TABLE `bits` (
`val` ENUM('T','F') NOT NULL
);
mysql> INSERT INTO `bits` (`val`) VALUES ('W'), ('T'), ('F');
Query OK, 3 rows affected, 1 warning (0.00 sec)
Revise this Paste