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.
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%'.