EXISTS predicate
The EXISTS predicate tests for the existence of certain rows.
The fullselect may specify any number of columns, and
- The result is true only if the number of rows specified by the fullselect is not zero.
- The result is false only if the number of rows specified by the fullselect is zero.
- The result cannot be unknown.
The values returned by the fullselect are ignored.
Example
EXISTS (SELECT *
FROM EMPLOYEE WHERE SALARY > 60000)