Oracle® Database SQL Language Reference 11g Release 2 (11.2) Part Number E26088-02 |
|
|
PDF · Mobi · ePub |
An EXISTS
condition tests for existence of rows in a subquery.
Table 7-11 shows the EXISTS
condition.
SQLRF52168Table 7-11 EXISTS Condition
Type of Condition | Operation | Example |
---|---|---|
EXISTS |
|
SELECT department_id FROM departments d WHERE EXISTS (SELECT * FROM employees e WHERE d.department_id = e.department_id) ORDER BY department_id; |