Home › coding › sql › sql like wildcards

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.

✓ 100% Free ✓ No Login Needed ✓ NCERT / CBSE Aligned ✓ Download as PDF

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 Jul 14, 2026

🤖 Stuck on any question? Ask Syllab's free AI Tutor for a step-by-step explanation — instant, unlimited, no login.

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 →

Explore:

  • Syllabus
  • Practice
  • Mock Tests
  • NCERT Solutions
  • Coding
  • GK Quiz
  • Career Predictor
  • AI Tutor
  • Live Quiz
  • Doubt Solver
  • Microlearning
  • Free Alternatives
  • Kids Zone
  • Study Room
  • Calculators
  • Worksheets

Syllab.in — Free learning for Indian students, Class 1–12