Pervasive logo

Prev SQL Engine Reference Next

ALL


ALL has two forms:

ALL (in a query)

Remarks

When you specify the ALL keyword before a subquery, Pervasive.SQL V8 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.SQL V8 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.

Examples

The following SELECT statement compares the ID column from the Person table to the ID columns in the result table of the subquery:

SELECT p.ID, p.Last_Name 
FROM Person p 
WHERE p.ID <> ALL 
(SELECT f.ID FROM Faculty f WHERE f.Dept_Name = 'Chemistry')  

If the ID value from Person does not equal to any of the ID values in the subquery result table, Pervasive.SQL includes the row from Person in the final result table of the statement.

See Also

SELECT (with into)

SELECT

UNION

ALL (SQL Right)

This form of ALL is used in a GRANT statement.

When you specify ALL, the INSERT, UPDATE, ALTER, SELECT, DELETE and REFERENCES rights are granted to the specified user or group. In addition, the user or group is granted the CREATE TABLE right for the dictionary.

Example

The following statement grants all these privileges to dannyd for table Class.

GRANT ALL on Class to dannyd

See Also

GRANT

REVOKE


Prev
ADD
Contents
Up
Check for Revisions
Next
ALTER TABLE