Skip to main content
SQL โ€ข LESSON 50

NOT LIKE

How can we exclude rows matching a text pattern?

Beginnerโฑ 3 Minutesโญ 630 XP
๐Ÿค” THE QUESTION

How can we exclude rows matching a text pattern?

๐Ÿ’ก WHAT IS IT?

The NOT LIKE operator filters out all records whose string values match the specified pattern.

๐ŸŽฏ WHAT IS IT USED FOR?

Omitting test email accounts, excluding legacy prefix IDs, cleaning raw text datasets.

๐Ÿ’ป EXAMPLE
SELECT name
FROM employees
WHERE name NOT LIKE 'A%';

๐ŸŽฏ Mission Objectives

Practice typing production-grade SQL code for NOT LIKE.

  • โœ“ NOT LIKE
  • โœ“ Pattern exclusion
  • โœ“ Text cleansing
  • โœ“ Negative matching