NOT()
All functions > LOGICAL > NOT()
Returns FALSE if the operand is TRUE, TRUE if it is FALSE.
Signatures
Returns: Negated truth value; NULL if the operand is NULL
NOT(expr1: BOOLEAN) → BOOLEAN sql
| Parameter | Type | Required | Description |
|---|---|---|---|
expr1 | BOOLEAN | Yes | Boolean expression to negate |
Notes
- Unary negation on a boolean expression
Related operators
Examples
NOT(expr)
FeatureQL
SELECT
f1 := NOT(FALSE), -- Negate false
f2 := NOT(TRUE), -- Negate true
f3 := NOT(NULL::BOOLEAN) -- NULL operand
;Result
| f1 BOOLEAN | f2 BOOLEAN | f3 BOOLEAN |
|---|---|---|
| true | false | NULL |
On this page