LIKE & Wildcards - Pattern Matching1 / 10
We can use LIKE with wildcards to filter for certain patterns in text. The % wildcard replaces any number of characters in a string of text. To select any dog whose name starts with B, try:
SELECT dog_id, name FROM dogs WHERE name LIKE 'B%';| dog_id | name | breed | age |
|---|---|---|---|
| 1 | Buddy | Golden Retriever | 5 |
| 2 | Bella | Labrador | 4 |
| 3 | Bailey | Beagle | 3 |
| 4 | Max | German Shepherd | 6 |
| 5 | Milo | Pug | 2 |
| 6 | Buster | Bulldog | 7 |
| 7 | Charlie | Spaniel | 4 |
Ctrl+Enter to submit
LIKE & Wildcards - Pattern Matching - Free SQL Practice Online
Practise LIKE & Wildcards - Pattern Matching with 10 free, interactive SQL exercises. You type real queries into your browser and get instant feedback on every answer - no database setup, no install, and no signup. It is a fast, hands-on way to learn SQL online and build query skills you can use at work.