O'Reilly logo

SQL: Visual QuickStart Guide by Chris Fehily

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Comparing All Subquery Values with ALL

You can use the ALL keyword to determine whether a value is less than or greater than all the values in a subquery result. The important characteristics of subquery comparisons that use ALL are:

  • ALL modifies a comparison operator in a subquery comparison test and follows =, <>, <, <=, >, or >=; see “Comparing a Subquery Value by Using a Comparison Operator” earlier in this chapter.

  • The combination of a comparison operator and ALL tells the DBMS how to apply the comparison test to the values returned by a subquery. < ALL, for example, means less than every value in the subquery result, and > ALL means greater than every value in the subquery result.

  • When ALL is used with <, <=, >, or >=, the comparison is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required