Like SQL Tutorial

Like Syntax:

SELECT column(s) FROM table WHERE column LIKE pattern

Employee table:

EMPLOYEE_IDNAMEDEP_ID
1John21
2Samantha22
3Tom23
4James24
5Sandra24

Like Example 1:

Find the employee names that contain letters: am.
SELECT * FROM employee WHERE name LIKE '%am%';

Like Result:

EMPLOYEE_IDNAMEDEP_ID
2Samantha22
4James24

Like Example 2:

Find the employee names that begin with: J.
SELECT * FROM employee WHERE name LIKE 'J%';

Like Result:

EMPLOYEE_IDNAMEDEP_ID
1John21
4James24

Like Example 3:

Find the employee names that end with: a.
SELECT * FROM employee WHERE name LIKE '%a';

Like Result:

EMPLOYEE_IDNAMEDEP_ID
2Samantha22
5Sandra24