LIKE in MySQL — How It Works

What the MySQL LIKE function does, with an example.

Published October 23, 2026

LIKE tests whether a string matches a pattern using % (any characters) and _ (single character) wildcards.

Key points

  • Part of standard SQL functions available in MySQL for working with text/strings

Example

SELECT * FROM users WHERE email LIKE '%@gmail.com';
More SQL articles