MySQL Tutorial/Subquery/ALL — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 09:54, 26 мая 2010
Greater than ALL
If table t2 is empty, the result is TRUE.
So, the following statement is TRUE when table t2 is empty:
SELECT * FROM t1 WHERE 1 > ALL (SELECT s1 FROM t2);
NULL subquery with "> ALL"
SELECT * FROM t1 WHERE 1 > ALL (SELECT MAX(s1) FROM t2) is NULL when table t2 is empty:
SELECT * FROM t1 WHERE 1 > ALL (SELECT MAX(s1) FROM t2);
Subqueries with ALL
Syntax:
operand comparison_operator ALL (subquery)