← CodePrimer
SQL
Beginner
Database
LIKE search pattern
How do I search text with a keyword?
LIKE %term%.
SELECT id, name
FROM students
WHERE name LIKE '%ada%'
ORDER BY name
LIMIT 20;
Notes
Leading % prevents index use — OK for small tables/learning apps.
Keywords: like · search · wildcard
Related
SQL
CREATE DATABASE
How do I create a MySQL database?
SQL
ALTER TABLE add column
How do I add a column to an existing table?
SQL
Foreign key relationship
How do I relate posts to users?
SQL
COUNT with GROUP BY
How do I count rows per category?
SQL
Basic transaction
How do I commit or roll back multiple writes?
SQL
WHERE with AND / OR
How do I combine filters in SQL?