MySQL SQLLesson 11Free preview
MySQL NOT
This lesson is part of MySQL · All levels
Summary
The NOT operator reverses the evaluation results of a condition, so that the previous line TRUE becomes FALSE and vice versa. NOT is often used with IN, BETWEEN, and LIKE to obtain the opposite, for example a city other than Jakarta or a price outside a certain range. For the NULL condition, use IS NOT NULL because NOT = NULL does not work as imagined.
Key points
- NOT reversing the outcome of the condition into the opposite.
- Not often combined with IN, BETWEEN, and LIKE
- IS NOT is the correct way to filter out the values that are not
- The symbol not in MySQL is an exclamation mark!
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.