<= [less]
All functions > COMPARISON > <= [less]
Returns TRUE if the first value is less than or equal to the second value
Syntax
expr1 <= expr2
Notes
- Both values must be of comparable types
- NULL comparisons always return NULL (three-valued logic)
- Returns TRUE if values are equal OR first is less than second
- For strings, uses lexicographic (dictionary) ordering
- For dates/timestamps, compares chronologically
- For ARRAY and ROW, ordering is lexicographic / field-by-field when types align
- Supports optional decimal precision for numeric comparisons
Related Functions
Examples
<= — equality branch
FeatureQL
SELECT
-- Equal values count
f1 := 3 <= 3,
-- Strictly less
f2 := 2 <= 3,
-- Greater is false
f3 := 4 <= 3
;Result
| f1 BOOLEAN | f2 BOOLEAN | f3 BOOLEAN |
|---|---|---|
| true | true | false |
<= — arrays and rows
FeatureQL
SELECT
-- Equal as lexicographic values
f1 := ARRAY(1, 2, 3) <= ARRAY(1., 2., 3.),
-- Shorter is less when the shared prefix is equal
f2 := ARRAY(1, 2) <= ARRAY(1., 2., 3.),
-- Field-wise; integer/decimal may align
f3 := ROW(1 AS a) <= ROW(1. AS a)
;Result
| f1 BOOLEAN | f2 BOOLEAN | f3 BOOLEAN |
|---|---|---|
| true | true | true |
<= — NULL
FeatureQL
SELECT
-- NULL input
f1 := NULL::BIGINT <= 1
;Result
| f1 BOOLEAN |
|---|
| NULL |