SQL Cheat Sheet/Pattern matching with LIKE

Find rows using wildcard patterns.

Section: Filtering Rows

Pattern matching with LIKE

sql
sql
SELECT *
FROM customers
WHERE email LIKE '%@example.com';
Explanation

Use % for any-length wildcard and _ for a single character.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Filtering Rows
Filter with equality
Return rows matching an exact value.
OpenIn sheetsqlsame section
Use comparison operators
Compare numeric or date values.
OpenIn sheetsqlsame section
Filter with IN
Match any value from a list.
OpenIn sheetsqlsame section
Filter with BETWEEN
Filter a value within an inclusive range.
OpenIn sheetsqlsame section
Test for NULL
Filter rows with missing values.
OpenIn sheetsqlsame section
Select all columns
Return all columns from a table.