Mega Code Archive

 
Categories / MySQL Tutorial / Data Types
 

BOOL, BOOLEAN

These types are synonyms for TINYINT(1). A value of zero is considered false. Non-zero values are considered true: The constants TRUE and FALSE evaluate to 1 and 0, respectively. mysql> mysql> SELECT TRUE, true, FALSE, false; +------+------+-------+-------+ | TRUE | TRUE | FALSE | FALSE | +------+------+-------+-------+ |    1 |    1 |     0 |     0 | +------+------+-------+-------+ 1 row in set (0.00 sec) mysql>