Comparison Operators Modified by ANY, SOME, or ALL

一时失言乱红尘 2022-01-05 18:49 185阅读 0赞

Comparison operators that introduce a subquery can be modified by the keywords ALL or ANY. SOME is an ISO standard equivalent for ANY.

Subqueries introduced with a modified comparison operator return a list of zero or more values and can include a GROUP BY or HAVING clause. These subqueries can be restated with EXISTS.

ANY=SOME; Comparison operators that introduce a subquery can be modified by the keywords ALL or ANY. SOME is an ISO standard equivalent for ANY.

ALL;means greater than every value. In other words, it means greater than the maximum value. For example, >ALL (1, 2, 3) means greater than 3.
ANY;means greater than at least one value, that is, greater than the minimum. So >ANY (1, 2, 3) means greater than 1.

=ANY;It is equivalent to IN

=ALL, It can not display anything

<>ANY;however, differs from NOT IN: < >ANY means not = a, or not = b, or not = c. NOT IN means not = a, and not = b, and not = c.
<>ALL;means the same as NOT IN.

转载于:https://www.cnblogs.com/flysun0311/archive/2013/02/25/2931794.html

发表评论

表情:
评论列表 (有 0 条评论,185人围观)

还没有评论,来说两句吧...

相关阅读