Beginner

182. LIKE with Percent Wildcard

Learn how the percent wildcard is used with LIKE for flexible text searches.

📘 Lesson 182 of 728 ⏱ 8 min 🎯 Beginner

The percent wildcard (%) represents zero or more characters in a LIKE pattern in commonly used SQL implementations.

It allows analysts to search for text that starts with, ends with, or contains a particular sequence of characters.

Find customers whose names contain the word Kumar.

SQL
SELECT
    CustomerName
FROM Customers
WHERE CustomerName LIKE '%Kumar%';

It is useful for customer searches, product searches, address matching, data-quality checks, and text analysis.

  • % matches zero or more characters.
  • A% searches for values beginning with A.
  • %A searches for values ending with A.
  • %A% searches for values containing A.
  • Wildcard searches can affect performance on large datasets.
What does % mean in LIKE?

The percent wildcard commonly represents zero or more characters.

How do you search for text containing a word?

Place the percent wildcard before and after the search text, such as LIKE '%word%'.

Have you finished this lesson?

Introduction to SQL – All Lessons