mysql> select 4 >any(select 33 as V UNION ALL select 11) as R;
+---+
| R |
+---+
| 0 |
+---+
1 row in set (0.00 sec)
mysql> select 34 >any(select 33 as V UNION ALL select 11) as R;
+---+
| R |
+---+
| 1 |
+---+
1 row in set (0.01 sec)
-----------
ALL
mysql> select 34 >ALL(select 33 as V UNION ALL select 11) as R;
+---+
| R |
+---+
| 1 |
+---+
1 row in set (0.00 sec)
https://dev.mysql.com/doc/refman/8.4/en/any-in-some-subqueries.html
Syntax:
operand comparison_operator ANY (subquery)
operand IN (subquery)
operand comparison_operator SOME (subquery)
Where comparison_operator
is one of these operators:
= > < >= <= <> !=