|
Use the EXISTS keyword to test whether rows exist in the result of the subquery. For every row the outer query evaluates, Pervasive.SQL V8 tests for the existence of a related row from the subquery. Pervasive.SQL V8 includes in the statement's result table each row from the outer query that corresponds to a related row from the subquery.
In most cases, a subquery with EXISTS can be rewritten to use IN. The SRDE can process the query more efficiently if the query uses IN.
The following statement returns a list containing only persons who have a 4.0 grade point average:
This statement can be rewritten to use IN:
|
Chapter contents
Prev topic: END
|