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
    -- Negate false
    f1 := NOT(FALSE),
    -- Negate true
    f2 := NOT(TRUE),
    -- NULL operand
    f3 := NOT(NULL::BOOLEAN)
;
Result
f1 BOOLEANf2 BOOLEANf3 BOOLEAN
truefalseNULL

Last update at: 2026/06/20 10:08:10