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
ParameterTypeRequiredDescription
expr1BOOLEANYesBoolean 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 BOOLEANf2 BOOLEANf3 BOOLEAN
truefalseNULL

Last update at: 2026/05/26 17:22:09