!= [not]

All functions > COMPARISON > != [not]

Returns TRUE if the first value does not equal the second value

Syntax

expr1 != expr2

Notes

  • Both values must be of the same or compatible types
  • NULL comparisons always return NULL (three-valued logic)
  • For strings, performs case-sensitive comparison
  • For numeric types, supports optional decimal precision
  • For ARRAY and ROW, same structural rules as =
  • Opposite of equals (=)

Related Functions

Examples

!= — inequality

FeatureQL
SELECT
    f1 := 1 != 2, -- Different numbers
    f2 := 'a' != 'b', -- Different strings
    f3 := 3 != 3 -- Same value
;
Result
f1 BOOLEANf2 BOOLEANf3 BOOLEAN
truetruefalse

!= — arrays and rows

FeatureQL
SELECT
    f1 := ARRAY(1, 2) != ARRAY(1., 2., 3.), -- Different lengths / elements
    f2 := ARRAY(1, 2) != ARRAY(1., 2.) -- Same values under alignment
;
Result
f1 BOOLEANf2 BOOLEAN
truefalse

!= — three-valued logic

FeatureQL
SELECT
    f1 := NULL::BIGINT != 1, -- NULL on the left
    f2 := NULL::BIGINT != NULL::BIGINT -- NULL vs NULL
;
Result
f1 BOOLEANf2 BOOLEAN
NULLNULL

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