Use LIKE to find matching strings and substrings

suggest change

See full documentation on LIKE operator.

This example uses the Employees Table from the Example Databases.

SELECT *
FROM Employees
WHERE FName LIKE 'John'

This query will only return Employee #1 whose first name matches ‘John’ exactly.

SELECT *
FROM Employees
WHERE FName like 'John%'

Adding % allows you to search for a substring:

In this case, the query will return Employee #2 whose name is ‘John’ as well as Employee #4 whose name is ‘Johnathon’.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents