SQL Syntax Reference : ALL
 
ALL
Remarks
When you specify the ALL keyword before a subquery, PSQL performs the subquery and uses the result to evaluate the condition in the outer query. If all the rows returned by the subquery meet the outer query condition for a particular row, then PSQL includes that row in the final result table generated by the statement.
Generally, you can use the EXISTS or NOT EXISTS keyword instead of ALL.
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 any of the ID values in the subquery result table, PSQL includes the row from Person in the final result table of the statement.
See Also
SELECT (with INTO)
SELECT
UNION