NOT_DISPLAYS_AS()

All functions > COMPARISON > NOT_DISPLAYS_AS()

Returns TRUE if two values are distinct, treating NULL values as comparable.

Signatures

Returns: Null-safe equality / inequality result

NOT_DISPLAYS_AS(expr1: T, expr2: T) → BOOLEAN
sql
ParameterTypeRequiredDescription
expr1TYesFirst value
expr2TYesSecond value

Notes

  • Unlike !=, NULL is treated as comparable here (three-valued logic does not apply the same way)
  • NULL NOT DISPLAYS AS NULL is FALSE (they are not distinct)
  • value NOT DISPLAYS AS NULL is TRUE when value is not NULL
  • NULL NOT DISPLAYS AS value is TRUE when value is not NULL
  • Both values must be of the same type (including ARRAY/ROW; element and field types must match)
  • FeatureQL-native spelling; SQL IS DISTINCT FROM is registered separately so format/querytools match the syntax you used

Related operators

See also

Examples

NOT_DISPLAYS_AS — functional call

FeatureQL
SELECT
    f1 := NOT_DISPLAYS_AS(1, 2), -- `NOT_DISPLAYS_AS(expr1, expr2)` matches keyword `NOT DISPLAYS AS`
    f2 := NOT_DISPLAYS_AS(NULL::BIGINT, NULL::BIGINT) -- Both NULL: not distinct
;
Result
f1 BOOLEANf2 BOOLEAN
truefalse

NOT_DISPLAYS_AS — chained

FeatureQL
SELECT
    f1 := (1).NOT_DISPLAYS_AS(2), -- Receiver is the left-hand operand
    f2 := (NULL::BIGINT).NOT_DISPLAYS_AS(NULL::BIGINT) -- Same semantics as the prefix call
;
Result
f1 BOOLEANf2 BOOLEAN
truefalse

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