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

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