Skip to main content
SQL • LESSON 49

LIKE with Wildcards

How can we search for text containing a pattern anywhere inside a value?

Beginner3 Minutes620 XP
🤔 THE QUESTION

How can we search for text containing a pattern anywhere inside a value?

💡 WHAT IS IT?

Enclosing a pattern between percentage wildcards (%pattern%) matches substring occurrences anywhere within the string.

🎯 WHAT IS IT USED FOR?

Full-text search, surname matching ('%son%'), keyword detection in descriptions.

💻 EXAMPLE
SELECT name
FROM employees
WHERE name LIKE '%son%';

🎯 Mission Objectives

Practice typing production-grade SQL code for LIKE with Wildcards.

  • Substring search
  • Surrounding wildcards
  • Text scanning
  • LIKE matching