MySQL SQLLesson 9Free preview
MySQL AND
This lesson is part of MySQL · All levels
Summary
The AND operator is used to combine two or more conditions that all must be TRUE values in order for a row to be displayed. You can install as many ANDs as possible, for example to select a specific product in a specific category and price range. In SQL logic, conditions involving NULL tend to produce UNKNOWN so that the line is filtered out.
Key points
- And return TRUE only if all the conditions next to it are true
- And can be used many times in a single clause WHERE
- AND has a higher priority than OR when combined
- Compare with the && operator that is also valid in MySQL as the AND counterpart
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.