Using if statement with BOOLEAN
|
mysql> mysql> SELECT IF(0, 'true', 'false'); +------------------------+ | IF(0, 'true', 'false') | +------------------------+ | false | +------------------------+ 1 row in set (0.00 sec)
mysql> SELECT IF(1, 'true', 'false'); +------------------------+ | IF(1, 'true', 'false') | +------------------------+ | true | +------------------------+ 1 row in set (0.00 sec)
mysql> SELECT IF(2, 'true', 'false'); +------------------------+ | IF(2, 'true', 'false') | +------------------------+ | true | +------------------------+ 1 row in set (0.00 sec)
mysql> mysql> mysql>
|
|
|
Related Scripts with Example Source Code in same category :
-
-
|
|