MySQL SQLLesson 40Free preview
MySQL ALL
This lesson is part of MySQL · All levels
Summary
ALL compares the value with all the results of the subquery and is only worth TRUE when the entire comparison is met. Because the requirements are strict, > ALL is often used to search for values that exceed a group's highest value. Under the condition of = ALL, all the values of the resulting subquery must be exactly the same as the values compared.
Key points
- ALL is only worth TRUE if all the results of the subquery satisfy the comparison
- > ALL means greater than the greatest value of the result of the subquery
- = ALL equals logic AND on each result line
- If the subquery does not produce a row, the comparison with ALL is TRUE
- ALL needs a subquery that returns one column
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.