Skip to content

SyntaxOperators

Glythcing edited this page Sep 17, 2018 · 1 revision

Comparison Operators

Operator Description Example
= Are the values of two operands equal? a = 1
!= Are the values of two operands not equal? a != 1
> Is the value of the left operand greater than the value of the right operand? a > 1
< Is the value of the left operand less than the value of the right operand? a < 1
>= Is the value of the left operand greater than or equal to the value of the right operand? a >= 1
<= Is the value of the left operand less than or equal to the value of the right operand? a <= 1

Logical Operators

Operator Description Example
in Is the value of the left operand in a list of literals provided in the right operand? a in (1, 2, 3)
like Does the value of the left operand match, allowing for wildcards, a literal value provided in the right operand? a like 'foo%'
null Is the value of the left operand null? a is null
not Negates the meaning of the logical operator with which it is used a is not null, a not in (1, 2, 3), a not like 'foo%'

Arithmetic Operators

Operator Description Example
+ Adds two predicate identifiers 10 + a, 5 + 5
- Subtracts two predicate identifiers 10 - a, 15 - 5
* Multiplies two predicate identifiers 10 * a, 5 * 2
/ Divides two predicate identifiers 10 / a, 20 / 2