SQL/MX 2.x Reference Manual (G06.24+, H06.03+)
SQL/MX Language Elements
HP NonStop SQL/MX Reference Manual—523725-004
6-102
Quantified Comparison Predicates
 36000.00
 18000.10
--- 3 row(s) selected.
The SELECT statement using this inner query yields these results. The salaries 
listed are greater than the salary of every employees with jobcode equal to 420—
that is, greater than $33,000.00, $36,000.00, and $18,000.10:
SELECT empnum, first_name, last_name, salary
FROM persnl.employee
WHERE salary > ALL (SELECT salary
 FROM persnl.employee
 WHERE jobcode = 420);
EMPNUM FIRST_NAME LAST_NAME SALARY
------ --------------- -------------------- -----------
 1 ROGER GREEN 175500.00
 23 JERRY HOWARD 137000.10
 29 JANE RAYMOND 136000.00
 ...
 343 ALAN TERRY 39500.00
 557 BEN HENDERSON 65000.00
 568 JESSICA CRINER 39500.00
--- 23 row(s) selected.
•
This predicate is true if the part number is equal to any part number with more than 
five units in stock:
partnum = ANY (SELECT partnum 
 FROM sales.odetail 
 WHERE qty_ordered > 5) 
Consider this SELECT statement using the preceding predicate:
SELECT ordernum, partnum, qty_ordered 
FROM sales.odetail 
WHERE partnum = ANY (SELECT partnum 
 FROM sales.odetail 
 WHERE qty_ordered > 5);










