Introduction
Operators
ClickHouse operators in Propel
Propel offers a wide range of operators in ClickHouse SQL. Here’s an overview of the key operators:
Arithmetic Operators
+
: Addition-
: Subtraction*
: Multiplication/
: Division%
: Modulo
Comparison Operators
=
,==
: Equal to!=
,<>
: Not equal to<
: Less than>
: Greater than<=
: Less than or equal to>=
: Greater than or equal to
Logical Operators
AND
: Logical ANDOR
: Logical ORNOT
: Logical NOT
BETWEEN Operator
a BETWEEN b AND c
: Equivalent toa >= b AND a <= c
a NOT BETWEEN b AND c
: Equivalent toa < b OR a > c
IN Operator
a IN (x, y, z)
: Checks ifa
is equal to any value in the lista NOT IN (x, y, z)
: Checks ifa
is not equal to any value in the list
LIKE Operator
a LIKE pattern
: Pattern matching with%
(any string) and_
(any single character)a NOT LIKE pattern
: Negation of LIKE
IS NULL Operator
a IS NULL
: Checks ifa
is NULLa IS NOT NULL
: Checks ifa
is not NULL
Conditional Operator
a ? b : c
: Ifa
is true, returnsb
, otherwise returnsc
Concatenation Operator
||
: Concatenates strings
Was this page helpful?