All operators

Operators by type

Mathematical Operators

OperatorDescriptionExampleResultFunction
+Addition5 + 38 ADD
-Subtraction7 - 25 SUBSTRACT
*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 tostatus = 'active'TRUE if status equals 'active' EQUALS
<> or !=Not equal tocolor <> 'red'TRUE if color is not 'red' NOT_EQUALS
BETWEENRange checkage BETWEEN 18 AND 65TRUE if age is 18-65 inclusive BETWEEN

See also: Comparison Functions

String Operators

OperatorDescriptionExampleResultFunction
||String concatenation'Hello' || ' ' || 'World''Hello World' CONCAT_FUNC
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 with unbounded arguments

OperatorDescriptionExampleResultFunction
FLATTENFlattens an array of arrays into a single arrayFLATTEN(ARRAY(1, 2), ARRAY(3, 4))ARRAY(1, 2, 3, 4) FLATTEN_FUNC
MERGEMerges multiple arrays into a single arrayMERGE(ARRAY(1, 2), ARRAY(3, 4))ARRAY(1, 2, 3, 4) MERGE_FUNC
ARRAY_MERGEMerges multiple arrays into a single arrayARRAY_MERGE(ARRAY(1, 2), ARRAY(3, 4))ARRAY(1, 2, 3, 4) ARRAY_MERGE_FUNC
ZIPZips multiple arrays into a single arrayZIP(ARRAY(1, 2), ARRAY(3, 4))ARRAY(1, 3, 2, 4) ZIP_FUNC
ARRAY_CONCATConcatenates multiple arrays into a single arrayARRAY_CONCAT(ARRAY(1, 2), ARRAY(3, 4))ARRAY(1, 2, 3, 4) ARRAY_CONCAT_FUNC
ALLReturns TRUE if all values in the array are TRUEALL(TRUE, TRUE, TRUE)TRUE ALL_FUNC
ANYReturns TRUE if any value in the array is TRUEANY(TRUE, FALSE, TRUE)TRUE ANY_FUNC
NONEReturns TRUE if no value in the array is TRUENONE(FALSE, FALSE, FALSE)TRUE NONE_FUNC
GREATESTReturns the greatest value in the arrayGREATEST(1, 2, 3)3 GREATEST_FUNC
LEASTReturns the least value in the arrayLEAST(1, 2, 3)1 LEAST_FUNC
COALESCEReturns the first non-NULL value in the arrayCOALESCE(NULL, 2, NULL)2 COALESCE_FUNC
CONCATConcatenates multiple strings into a single stringCONCAT('Hello', 'World')'HelloWorld' CONCAT_FUNC
CONCAT_WSConcatenates multiple strings with a separatorCONCAT_WS('-', 'Hello', 'World')'Hello-World' CONCAT_WS_FUNC

Operators precedence

OperatorPrecedenceDescription
()1Parentheses
:=2Assignment
[]3Array/Row extraction
::4Type casting
.5Function chaining
* / // % ^5Multiplication/division/integer division/modulus/power
+ -6Addition/subtraction
= <> != > >= < <=7Comparison
AND OR8Logical AND/OR
Last update at: 2025/10/13 10:23:46