subquery is one that is categorized as a comparison operator and similar to the meaning in English,
it is used to determine when certain data satisfies a criteria compared to what the ANY condition specifies.
When using the
ANY subquery in
SQL Server database, it means that a comparison must be made and for the condition to satisfy the outer query,
the value that introduces your subquery must be greater than at least one of the values listed in the returned results of the subquery.
|1||New York||New York|
Find the cities that have the any state in the states table using = any.
SELECT * FROM cities c
WHERE c.state = ANY (SELECT s.name FROM states s );