Skip to content

PATTERN

SELECT * FROM Employees
WHERE Employee_Name LIKE '%son%'
| Employee_ID | Employee_Name | Department |
| ----------- | --------------- | -----------|
| 1 | Johnson Smith | IT |
| 2 | Samantha Watson | HR |

In this example, the LIKE pattern search is used in the WHERE clause to find all employees whose names contain the substring ‘son’. The ’%’ sign is used on both sides of ‘son’ to match any number of characters before and after ‘son’. As a result, it matches ‘Johnson Smith’ and ‘Samantha Watson’ from the ‘Employees’ table.