All operators
Operators by type
Mathematical Operators
| Operator | Description | Example | Result | Function |
|---|
| + | Addition | 5 + 3 | 8 | ADD |
| - | Subtraction | 7 - 2 | 5 | SUBTRACT |
| * | Multiplication | 4 * 3 | 12 | MULTIPLY |
| / | Division | 7 / 2 | 3.5 | DIVIDE |
| ^ | Power | 2 ^ 3 | 8 | POW |
| // | Integer division | 7 // 3 | 2 | DIVIDE_TYPE |
| % | Modulus (remainder) | 7 % 3 | 1 | MOD |
See also: Math Functions
Logical Operators
| Operator | Description | Example | Result | Function |
|---|
| AND | Logical AND | age > 18 AND salary > 50000 | TRUE if both conditions are true | AND |
| OR | Logical OR | status = 'active' OR status = 'pending' | TRUE if either condition is true | OR |
| NOT | Logical NOT | NOT is_deleted | TRUE if is_deleted is false | NOT |
See also: Logical Functions
Comparison Operators
| Operator | Description | Example | Result | Function |
|---|
| < | Less than | price < 100 | TRUE if price is less than 100 | LESS_THAN |
| > | Greater than | age > 18 | TRUE if age is greater than 18 | GREATER_THAN |
| <= | Less than or equal to | quantity <= 5 | TRUE if quantity is 5 or less | LESS_THAN_OR_EQUALS |
| >= | Greater than or equal to | score >= 90 | TRUE if score is 90 or greater | GREATER_THAN_OR_EQUALS |
| = | Equal to | status = 'active' | TRUE if status equals 'active' | EQUALS |
| <> or != | Not equal to | color <> 'red' | TRUE if color is not 'red' | NOT_EQUALS |
| BETWEEN | Range check | age BETWEEN 18 AND 65 | TRUE if age is 18-65 inclusive | BETWEEN |
See also: Comparison Functions
String Operators
| Operator | Description | Example | Result | Function |
|---|
| || | String concatenation | 'Hello' || ' ' || 'World' | 'Hello World' | CONCAT_FN |
| LIKE | Pattern matching | name LIKE 'Jo%' | TRUE if name starts with 'Jo' | LIKE |
See also: String Functions
Set Operators
| Operator | Description | Example | Result | Function |
|---|
| IN | Membership check | value IN (1, 2, 3) | TRUE if value is in the list | IN |
See also: Comparison Functions
Special Operators
| Operator | Description | Example | Result | Function |
|---|
| IS NULL | NULL check | phone IS NULL | TRUE if phone is NULL | IS_NULL |
| IS NOT NULL | Non-NULL check | email IS NOT NULL | TRUE if email is not NULL | IS_NOT_NULL |
| [] | Array/Row extraction | array[1] or row[field_1] | Returns element at index 1 or field_1 | ARRAY_EXTRACT |
See also: Comparison Functions , Array Functions
Operators precedence
| Operator | Precedence | Description |
|---|
| () | 1 | Parentheses |
| := | 2 | Assignment |
| [] | 3 | Array/Row extraction |
| :: | 4 | Type casting |
| . | 5 | Function chaining |
| * / // % ^ | 5 | Multiplication/division/integer division/modulus/power |
| + - | 6 | Addition/subtraction |
| = <> != > >= < <= | 7 | Comparison |
| AND OR | 8 | Logical AND/OR |