Sql Like Wildcards — Free Sql Tutorial
Learn Sql Like Wildcards in Sql with a free, beginner-friendly tutorial, examples and practice for Indian students on Syllab.in.
TL;DR: Learn Sql Like Wildcards in Sql with a free, beginner-friendly tutorial, examples and practice for Indian students on Syllab.in.
Written & reviewed by the Syllab.in Academic Team (CBSE/NCERT subject experts) · Updated
Sql Like Wildcards in Sql
LIKE matches text patterns. % matches any sequence (0 or more chars), _ matches exactly one char. Use LIKE with WHERE to find rows containing a substring.
Case sensitivity: LIKE is case-insensitive in MySQL, case-sensitive in PostgreSQL (use ILIKE for case-insensitive). Always use LOWER() for reliable case-insensitive searches.
Performance: LIKE %value% (leading wildcard) cannot use indexes. LIKE value% (trailing wildcard) can use an index for faster searches.
Sql Like Wildcards — Syntax
WHERE name LIKE 'A%' -- starts with A WHERE name LIKE '%ar%' -- contains 'ar' anywhere WHERE name LIKE '_mail' -- 5 chars, ends in 'mail' WHERE name LIKE 'J%n' -- starts with J, ends with n WHERE email LIKE '%@gmail%' -- Gmail emails
Learn Sql Like Wildcards step by step with Syllab's free interactive Sql tutorial — runnable code examples, practice exercises and instant AI feedback, all free with no signup. Explore the full Sql course →