A condition is used to evaluate the value of data. It consists of one or more expressions combined with logical (Boolean) operators and returns TRUE, FALSE, or UNKNOWN.
You can use conditions in the WHERE clause of the following SQL statements:
DELETESELECTUPDATE
You can also use conditions in the following clauses of a SELECT statement:
WHEREHAVING
Conditions can be referred to as logical data types. For example, the evaluation result of the simple condition 1 = 1 is TRUE.
A logical condition can combine multiple conditions into one. For example, the logical condition AND can combine multiple conditions into one.
(1 = 1) AND (5 < 7)
Valid conditions in SQL statements are shown below:
name = 'ALICE'
empno = 1001
hire_date > '2022-01-01'
job_id IN ('SA_MAN', 'SA_REP')
salary BETWEEN 5000 AND 8000
comm_pct IS NULL AND salary = 10000
The current version of OceanBase Database supports the following condition types:
