The values TRUE and FALSE are merely aliases for 1 and 0, respectively, as shown here
|
mysql> mysql> SELECT IF(0 = FALSE, 'true', 'false'); +--------------------------------+ | IF(0 = FALSE, 'true', 'false') | +--------------------------------+ | true | +--------------------------------+ 1 row in set (0.00 sec)
mysql> SELECT IF(1 = TRUE, 'true', 'false'); +-------------------------------+ | IF(1 = TRUE, 'true', 'false') | +-------------------------------+ | true | +-------------------------------+ 1 row in set (0.00 sec)
mysql> SELECT IF(2 = TRUE, 'true', 'false'); +-------------------------------+ | IF(2 = TRUE, 'true', 'false') | +-------------------------------+ | false | +-------------------------------+ 1 row in set (0.00 sec)
mysql> SELECT IF(2 = FALSE, 'true', 'false'); +--------------------------------+ | IF(2 = FALSE, 'true', 'false') | +--------------------------------+ | false | +--------------------------------+ 1 row in set (0.00 sec)
mysql>
|
|
|
Related Scripts with Example Source Code in same category :
-
-
|
|