Built-in Operator Call
AttentionThis page documents an earlier version. Go to the latest (v2.1)version.
An expression with operators is a compound expression that combines multiple expressions using builtin operators. The following sections discuss the supported operators in Yugabyte.
Nullary Operations
Operator | Description |
---|---|
EXISTS , NOT EXISTS | predicate for existence of a row |
EXISTS
andNOT EXISTS
can only be used in theIF
clause.
Unary Operations
OperatorDescription-
numeric negation+
no-opNOT
Logical (boolean) negation
- Unary
-
and+
can only be used with constant expressions such as-77
.
Binary Operations
OperatorDescriptionOR
, AND
Logical (boolean) expression=
, !=
, <
, <=
, >
, >=
Comparison expression+
Addition, append, or prepend-
Substraction or removal*
Multiplication. Not yet supported/
Division. Not yet supportedISNULL
, IS NOT NULL
Not yet supported comparison expression.
- The first argument of comparison operators must be a column. For example,
column_name = 7
. - Comparing
NULL
with others always yields afalse
value. OperatorISNULL
orIS NULL
must be used when comparing withNULL
. - When
+
and-
are applied to a NULL argument ofCOUNTER
datatype, the NULL expression is replaced with a zero value before the computation. When these operators are applied to a NULL expression of all other numeric datatypes, the computed value is always NULL. - Operator
+
either prepends or appends a value to a LIST while operator-
removes elements from LIST. - Operator
+
inserts new distinct elements to a MAP or SET while operator-
removes elements from them.
See Also
当前内容版权归 YugabyteDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 YugabyteDB .