Operators are generally used to connect individual data items such as operands or parameters and return results. In terms of syntax, operators can appear before, after, or between operands.
Common operators can be further divided into unary and binary operators:
Unary operators
Unary operators operate on a single operand. The common format for unary operators is as follows:
Operator operandBinary operators
Binary operators operate on two operands. The common format for binary operators is as follows:
operand1 operator operand2Note
- Other operators with special formats can accept more than two operands.
- If an operator is provided with a
NULLoperand, the result is alwaysNULL. The only exception is the character concatenation operator (||).
OceanBase Database currently supports the following operators: