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 Some Subquery Values with ANY

ANY works like ALL (see the preceding section) but instead determines whether a value is equal to, less than, or greater than any (at least one) of the values in a subquery result. The important characteristics of subquery comparisons that use ANY are:

  • ANY 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 ANY tells the DBMS how to apply the comparison test to the values returned by a subquery. < ANY, for example, means less than at least one value in the subquery result, and > ANY means greater than at least one value in the ...

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