An operator manipulates individual operands or arguments and returns a result. Syntactically, an operator can appear before an operand, after an operand, or between two operands.
General operators can be categorized into unary and binary operators.
Unary operators
A unary operator operates on only one operand. Unary operators and operands are written in the following format:
operator operandBinary operators
A binary operator manipulates two operands. Binary operators and operands are written in the following format:
operand1 operator operand2Note
- Other operators with special formats can accept more than two operands.
- If an operator is given a NULL operand, the result is always
NULL. The only exception is the concatenation operator (||).
OceanBase Database supports the following operators: