1527. Patients With a Condition
select *
from Patients
where conditions like '% DIAB1%' or conditions like 'DIAB1%' ;
SELECT * FROM Patients
# \s 匹配空格,\\sDIAB1 匹配后面的 DIAB1
# ^DIAB1 匹配 DIAB1开头的
WHERE conditions REGEXP '^DIAB1|\\sDIAB1'
rlike
等价于 REGEXP
。