Course Content

  • Tuple


MySQL NOT IN() ensures that none of the values in the arguments are present in the following expression.

SELECT  FROM contacts WHERE first name NOT IN  This MySQL NOT example would return all rows from the contacts table with a first name that is not Joseph, Andrew, or Brad.

According to the syntax above, the MySQL IN operator returns an equal value in the arguments. The IN keyword is used in conjunction with the WHERE clause.

NOT IN can't compare NULL values because it doesn't have that capability. In such instances, Not Exists is recommended. The query performs nested full table scans when "NOT IN" is used. The query can employ an index within the sub-query for "NOT EXISTS."

Recommended Courses

Share With Friend

Have a friend to whom you would want to share this course?

Download LearnVern App

App Preview Image
App QR Code Image
Code Scan or Download the app
Google Play Store
Apple App Store
598K+ Downloads
App Download Section Circle 1
4.57 Avg. Ratings
App Download Section Circle 2
15K+ Reviews
App Download Section Circle 3
  • Learn anywhere on the go
  • Get regular updates about your enrolled or new courses
  • Share content with your friends
  • Evaluate your progress through practice tests
  • No internet connection needed
  • Enroll for the webinar and join at the time of the webinar from anywhere