查询包含字符‘e’的信息
% 代表不确定个数的字符(零个或多个)
SELECT employee_id, first_name
FROM employees
WHERE first_name LIKE '%e%';
查询以字符‘e’开头的字符
SELECT employee_id, first_name
FROM employees
WHERE first_name LIKE 'e%';
_ 代表一个不确定的字符
查询第三个字符是‘e’的信息
SELECT employee_id, first_name
FROM employees
WHERE first_name LIKE '__e%';
查询第二个字符是‘_’,第三个字符是‘e’的信息:使用转义字符
SELECT employee_id, first_name
FROM employees
WHERE first_name LIKE '_\_e%';
ESCAPE指定一个字符代替‘\’
SELECT employee_id, first_name
FROM employees
WHERE first_name LIKE '_$_e%' ESCAPE '$';