不管后续长度与大小写
%在左侧, 指定B或b开头的人
SELECT *
FROM customers
WHERE last_name
LIKE 'b%'
%在中间
SELECT *
FROM customers
WHERE last_name
LIKE '%b%'
%在右侧, 指定y结尾的人
SELECT *
FROM customers
WHERE last_name
LIKE '%y'
_的用法
指定y前面就一个字符
SELECT *
FROM customers
WHERE last_name
LIKE '_y'
指定y前面5个字符
SELECT *
FROM customers
WHERE last_name
LIKE '_____y'
指定b后面四个字符并跟着y
SELECT *
FROM customers
WHERE last_name
LIKE 'b____y'
homework1
SELECT *
FROM customers
WHERE address LIKE '%trail%' OR
address LIKE '%AVENNUE%'
homework2
SELECT *
FROM customers
WHERE phone LIKE '%9'
SELECT *
FROM customers
WHERE phone NOT LIKE '%9'