= [equals]

All functions > COMPARISON > = [equals]

Returns TRUE if the first value equals 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 exact match
  • For numeric types, supports optional decimal precision
  • For dates/timestamps, compares exact date and time values
  • For ARRAY and ROW, compares element- or field-by-element when types align

Related Functions

Examples

= — values and strings

FeatureQL
SELECT
    f1 := 42 = 42, -- Numeric equality
    f2 := 'hello' = 'hello', -- Exact string match
    f3 := 'Hello' = 'hello' -- Case sensitive
;
Result
f1 BOOLEANf2 BOOLEANf3 BOOLEAN
truetruefalse

= — arrays and rows

FeatureQL
SELECT
    f1 := ARRAY(1, 2, 3) = ARRAY(1., 2., 3.), -- Element-wise; integer/decimal may align per element
    f2 := ROW(1 AS a) = ROW(1. AS a) -- Field-wise; same rules as scalars on each field
;
Result
f1 BOOLEANf2 BOOLEAN
truetrue

= — three-valued logic

FeatureQL
SELECT
    f1 := NULL::BIGINT = NULL::BIGINT, -- `=` never yields TRUE for NULL = NULL
    f2 := 1 = NULL::BIGINT -- Non-NULL vs NULL
;
Result
f1 BOOLEANf2 BOOLEAN
NULLNULL

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