✔ 最佳答案
Let me illustrate with an example.
Name OverduePay
Student1 10
Student2 20
Student3 30
The subquery (Select OverduePay From Student) returns 10, 20 and 30.
SELECT Name, OverduePay FROM Student WHERE OverduePay >= ALL (SELECT OverduePay FROM Student)
is identical to
SELECT Name, OverduePay FROM Student WHERE OverduePay >= 10 AND OverduePay>= 20 AND OverduePay>= 30
Using ALL is to compare the expression with ALL the values returned by the subquery and the result is True when all values meet the condition; otherwise the result is False.
In this example, only Student3 is true.
There is also SOME | ANY, which is equivalent to using OR in the WHERE clause of the sql statement.
Ref:
http://msdn.microsoft.com/en-us/library/ms178543.aspx
http://msdn.microsoft.com/en-us/library/ms175064.aspx