In SQL Server, the ALL
operator can be used with a subquery to compare a scalar value with a single-column set of values returned by the subquery.
It’s also true that the SELECT
clause and UNION
operator both accept an ALL
argument, although this usage has a different purpose (allows duplicates in the result set).
Below are examples of using the ALL
operator with a subquery.