This example illustrates how to find the boolean value.
This example illustrates how to find the boolean value.This example illustrates how to find the boolean value.
In this example we create a select query to show if we pass 0 then it will return false but when we set 1 then it will return true.
Query
|
Output
|
SELECT IF(0, 'true', 'false');
|
+------------------------+ | IF(0, 'true', 'false') | +------------------------+ | false | +------------------------+
|
SELECT IF(1, 'true', 'false');
|
+------------------------+ | IF(1, 'true', 'false') | +------------------------+ | true | +------------------------+
|