NOT

All functions > LOGICAL > NOT

Returns FALSE if the operand is TRUE, TRUE if it is FALSE.

Syntax

NOT expr  ·  NOT(expr)

Notes

  • Applies to boolean expressions, including comparisons and other logical combinations
  • NULL in, NULL out

Related Functions

Examples

NOT expr

FeatureQL
SELECT
    -- Prefix negates false
    f1 := NOT FALSE,
    -- Prefix negates 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