LESS_THAN_OR_EQUALS

All functions > COMPARISON > LESS_THAN_OR_EQUALS

Returns TRUE if the first value is less than or equal to the second value

Syntax

LESS_THAN_OR_EQUALS(expr1: T, expr2: T) → BOOLEAN
sql

Type Parameters:

  • T: Any comparable type (numeric, string, date, timestamp, boolean)

Arguments

ParameterTypeRequiredDescription
expr1TYesFirst value to compare
expr2TYesSecond value to compare
digitsANYNoOptional decimal precision for numeric comparisons

Returns

BOOLEAN - TRUE if expr1 <= expr2, FALSE otherwise, NULL if either value is NULL

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
  • Supports optional decimal precision for numeric comparisons

See also

Last update at: 2025/10/13 10:23:46