문제
입력 코드
1.
SELECT *
FROM Patients
WHERE conditions LIKE 'DIAB1%' OR conditions LIKE '% DIAB1%';
2. REGEXP
SELECT *
FROM Patients
WHERE conditions REGEXP '\\bDIAB1'
코드 설명
#SELECT #WHERE #LIKE #% #REGEXP
문제 출처
'SQL' 카테고리의 다른 글
#121. [LeetCode / MySQL] 176. Second Highest Salary (0) | 2024.06.22 |
---|---|
#120. [LeetCode / MySQL] 196. Delete Duplicate Emails (0) | 2024.06.21 |
#118. [LeetCode / MySQL] 1667. Fix Names in a Table (0) | 2024.06.20 |
#117. [LeetCode / MySQL] 185. Department Top Three Salaries (0) | 2024.06.20 |
#116. [LeetCode / MySQL] 585. Investments in 2016 (0) | 2024.06.19 |