All operators

Operators by type

Mathematical Operators

OperatorDescriptionExampleResultFunction
+Addition5 + 38 ADD
-Subtraction7 - 25 SUBTRACT
*Multiplication4 * 312 MULTIPLY
/Division7 / 23.5 DIVIDE
^Power2 ^ 38 POW
//Integer division7 // 32 DIVIDE_TYPE
%Modulus (remainder)7 % 31 MOD

See also: Math Functions

Logical Operators

OperatorDescriptionExampleResultFunction
ANDLogical ANDage > 18 AND salary > 50000TRUE if both conditions are true AND
ORLogical ORstatus = 'active' OR status = 'pending'TRUE if either condition is true OR
NOTLogical NOTNOT is_deletedTRUE if is_deleted is false NOT

See also: Logical Functions

Comparison Operators

OperatorDescriptionExampleResultFunction
<Less thanprice < 100TRUE if price is less than 100 LESS_THAN
>Greater thanage > 18TRUE if age is greater than 18 GREATER_THAN
<=Less than or equal toquantity <= 5TRUE if quantity is 5 or less LESS_THAN_OR_EQUALS
>=Greater than or equal toscore >= 90TRUE if score is 90 or greater GREATER_THAN_OR_EQUALS
=Equal to (three-valued)status = 'active'TRUE if equal; NULL = NULL → NULL EQUALS
<> or !=Not equal tocolor <> 'red'TRUE if color is not 'red' NOT_EQUALS
DISPLAYS ASNull-safe equalitya DISPLAYS AS bTRUE if not distinct (incl. both NULL) DISPLAYS_AS
NOT DISPLAYS ASNull-safe inequalitya NOT DISPLAYS AS bTRUE if distinct NOT_DISPLAYS_AS
BETWEENRange checkage BETWEEN 18 AND 65TRUE if age is 18-65 inclusive BETWEEN

Note: On FLOAT/DOUBLE, write .N (e.g. >.2, =.4, BETWEEN.3) for N digits of rounded precision via DECIMAL(38, N) staging. Example: 0.99999e0 =.4 1.00001e0TRUE. Any NaN operand makes the comparison NULL. Infinity, or any finite value too large for DECIMAL(38, N), falls back to a raw float compare — .N rounding is not applied on that path.

Note: Nested NULL inside ROW / ARRAY makes atomic comparisons (=, <, …) unknown — same three-valued rule as scalars. Prefer DISPLAYS AS for null-safe equality. See Literals — NULL in comparisons .

See also: Comparison Functions

String Operators

OperatorDescriptionExampleResultFunction
||String concatenation'Hello' || ' ' || 'World''Hello World' CONCAT_FN
LIKEPattern matchingname LIKE 'Jo%'TRUE if name starts with 'Jo'LIKE

See also: String Functions

Set Operators

OperatorDescriptionExampleResultFunction
INMembership checkvalue IN (1, 2, 3)TRUE if value is in the listIN

See also: Comparison Functions

Special Operators

OperatorDescriptionExampleResultFunction
IS NULLNULL checkphone IS NULLTRUE if phone is NULL IS_NULL
IS NOT NULLNon-NULL checkemail IS NOT NULLTRUE if email is not NULL IS_NOT_NULL
[]Array/Row extractionarray[1] or row[field_1]Returns element at index 1 or field_1ARRAY_EXTRACT

See also: Comparison Functions , Array Functions

Operators' precedence (highest first)

PrecedenceOperatorsDescription
1:=Assignment
2()Parentheses
3. -> |>Function/method chaining
4[]Array/row extraction
5::Type casting
6~Bitwise NOT
7^ **Power
8* / // %Multiply, divide, integer div, modulo
9+ -Addition, subtraction
10<< >>Bitwise shift left, bitwise shift right
11&Bitwise AND
12|Bitwise OR
13||String concatenation
14= <> != > >= < <=
BETWEEN NOT BETWEEN
LIKE NOT LIKE
IN NOT IN
DISPLAYS AS NOT DISPLAYS AS
IS NULL IS NOT NULL
Comparison
15NOTLogical NOT
16ANDLogical AND
17ORLogical OR