Oracle9i SQL Reference
Release 1 (9.0.1)

Part Number A90125-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

Conditions, 8 of 11


EXISTS Conditions

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

exists_condition::=


Text description of conditions5a.gif follows
Text description of exists_condition

Table 5-10 shows the EXISTS condition.

Table 5-10 EXISTS Conditions
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);
 

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback