Was this helpful?
In Operator
The following table explains the operators, in and not in:
Operator
Meaning
y in (x, ..., z)
y = x or ... or y = z
(x, ..., z) represents a list of expressions, each of which evaluates to a single value. None of the expressions (y, x, or z) can be subqueries. The in predicate returns true if y is equal to one of the values in the list represented by (x, ..., z).
y not in (x, ..., z)
not (y in (x, ..., z))
(x, ..., z) represents a list of expressions, each of which evaluates to a single value. The not in predicate returns true if y is not equal to any value in the list represented by (x, ..., z). None of the expressions (y, x, or z) can be subqueries.
y in (subquery)
The subquery must be specified in parentheses and can refer to only one column in its select clause. The predicate returns true if y is equal to one of the values returned by the subquery.
y not in (subquery)
The subquery must be specified in parentheses and can refer to only one column in its select clause. The predicate returns true if y is not equal to any of the values returned by the subquery.
Last modified date: 04/03/2024