|
When you specify the ALL keyword before a subquery, Pervasive PSQL v9 Service Pack 2 performs the subquery and uses the result to evaluate the condition in the outer query. If all the rows the subquery returns meet the outer query's condition for a particular row, Pervasive PSQL v9 Service Pack 2 includes that row in the final result table of the statement.
Generally, you can use the EXISTS or NOT EXISTS keyword instead of the ALL keyword.
The following SELECT statement compares the ID column from the Person table to the ID columns in the result table of the subquery:
If the ID value from Person does not equal to any of the ID values in the subquery result table, Pervasive PSQL includes the row from Person in the final result table of the statement.
|
Chapter contents
Prev topic: ADD
|