Using if statement with BOOLEAN : Boolean : Data Types MySQL TUTORIALS


MySQL TUTORIALS » Data Types » Boolean »

 

Using if statement with BOOLEAN


mysql>
mysql> SELECT IF(0'true', 'false');
+------------------------+
| IF(0'true', 'false') |
+------------------------+
false                  |
+------------------------+
row in set (0.00 sec)

mysql> SELECT IF(1'true', 'false');
+------------------------+
| IF(1'true', 'false') |
+------------------------+
true                   |
+------------------------+
row in set (0.00 sec)

mysql> SELECT IF(2'true', 'false');
+------------------------+
| IF(2'true', 'false') |
+------------------------+
true                   |
+------------------------+
row in set (0.00 sec)

mysql>
mysql>
mysql>



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

MySQL TUTORIALS

 Navioo Data Types
» Boolean