Boolean Literals
The SQL literals FALSE and TRUE can be used in expressions, including on the right side of an assignment. Boolean values or expressions can be tested against those literals using the IS operator. For example:
WHERE boolean_value IS TRUE
For input, the literals FALSE and TRUE are accepted, without case sensitivity.
Here is an example of using the literals FALSE and TRUE in an SQL context:
INSERT INTO example VALUES (FALSE);
UPDATE example SET column1 = TRUE;
SELECT * FROM example WHERE column1 IS TRUE;
...
var1 = TRUE;
WHILE var1 IS NOT FALSE
...
More information:
Last modified date: 06/28/2024