ALL, ANY, and SOME Subqueries

Use the ALL, ANY, and SOME keywords to specify what makes the condition TRUE or FALSE. A search condition that is TRUE when the ANY keyword is used might not be TRUE when the ALL keyword is used, and vice versa.

Read syntax diagramSkip visual syntax diagram
ALL, ANY, SOME Subquery

                  (1)                          (2)             
|--| Expression |------| Relational Operator |------+------+---->
                                                    +-ALL--+   
                                                    +-ANY--+   
                                                    '-SOME-'   

>--(--subquery--)-----------------------------------------------|

Notes:
  1. See Expression
  2. See Relational Operator
Element Description Restrictions Syntax
subquery Embedded query Cannot contain the FIRST or the ORDER BY clause SELECT statement

Copyright© 2021 HCL Technologies Limited