Skip Headers

Oracle9i SQL Reference
Release 2 (9.2)

Part Number A96540-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page Go to next page
View PDF

EXISTS Conditions

An EXISTS condition tests for existence of rows in a subquery.

exists_condition::=

Text description of conditions15a.gif follows
Text description of exists_condition


Table 5-10 shows the EXISTS condition.

Table 5-10  EXISTS Condition
Type of Condition Operation Example
EXISTS 

TRUE if a subquery returns at least one row.

SELECT department_id
  FROM departments d
  WHERE EXISTS
  (SELECT * FROM employees e
    WHERE d.department_id 
    = e.department_id);