Arithmetic Operators operate on one or more numeric operands and return numeric output.
The available arithmetic operators are: +, -, *, and /.
Arithmetic Operator Example: c := a + b;
Concatenation Operators (||) operate on two string operands to join them into a single string.
Concatenation Operator Example: a || b
Comparison Operators are used to build a comparable condition between two terms, thereby returning a logical result as TRUE, FALSE, or NULL.
The available Comparison operators are: =, <, >, <=, >=, (NOT)IN, (NOT) LIKE, (NOT) BETWEEN, (NOT) EXISTS, and IS (NOT) NULL.
Comparison Operator Example: if (a < b) then
Logical Operators operate on two operands and return a BOOLEAN output.
The available logical operators are: AND, OR, and NOT.
Logical Operator Example: if (a < b) AND (a!=0) then
Hierarchical Operators are used only in hierarchical queries.
The available hierarchical operators are: PRIOR and CONNECT_BY_ROOT.
Hierarchical Operator Example:
Set Operators are used to compound multiple queries and return the combined result set.
The available SET operators are: UNION, UNION ALL, MINUS, and INTERSECT.
Set Operator Example:
Multiset Operators combine the results of two nested tables into one.
The available Multiset Operators are: MULTISET, MULTISET EXCEPT, MULTISET INTERSECT, and MULTISET UNION.
User Defined Operators are created by the user. They take a set of operands and return a result.
They can be used using CREATE OPERATOR command.
User Defined Operator Syntax:
CREATE OR REPLACE OPERATOR [operator_name]
Related Code Snippets: