codegurukool.com · Free coding tutorials & online compiler

Home › SQL Tutorial › SQL LIKE and wildcards

SQL LIKE and wildcards

Search for text patterns.

LIKE matches patterns. % stands for any number of characters and _ for exactly one. 'C%' starts with C, '%a' ends with a, '%an%' contains "an".

Example code

SELECT name FROM Customers
WHERE name LIKE '%a';

Run this code in the online editor

← SQL aggregate functionsSQL IN and BETWEEN →