Description\n-----------\n\nSubqueries using the ALL keyword will return true if the comparison returns true for each row returned by the subquery, or the subquery returns no rows.\n\nSyntax\n\n``sql\nscalar_expression comparison_operator ALL <Table subquery>\n`\n\n scalar_expression may be any expression that evaluates to a single value.\n comparison_operator may be any one of: =, >, <, >=, <=, <> or !=\n\nALL returns:\n\n NULL if the comparison operator returns NULL for at least one row returned by the Table subquery or scalar_expression returns NULL.\n FALSE if the comparison operator returns FALSE for at least one row returned by the Table subquery.\n TRUE if the comparison operator returns TRUE for all rows returned by the Table subquery, or if Table subquery returns no rows.\n\nNOT IN is an alias for <> ALL`.\n\nExamples\n--------\n\nCREATE TABLE sq1 (num TINYINT);\n\nCREATE TABLE sq2 (num2 TINYINT);\n\nINSERT INTO sq1 VALUES(100);\n\nINSERT INTO sq2 VALUES(40),(50),(60);\n\nSELECT  FROM sq1 WHERE num > ALL (SELECT * FROM sq2);\n+------+\n| num  |\n+------+\n|  100 |\n+------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/data-manipulation/selecting-data/joins-subqueries/subqueries/subqueries-and-all