문제
입력 코드
DELETE p1
FROM person AS p1, person AS p2
WHERE p1.email = p2.email AND p1.id > p2.id
DELETE p1
FROM person AS p1
JOIN person AS p2
ON p1.email = p2.email
WHERE p1.email = p2.email AND p1.id > p2.id
코드 설명
#DELETE #JOIN #ON #WHERE
문제 출처
'SQL' 카테고리의 다른 글
#122. [LeetCode / MySQL] 1484. Group Sold Products By The Date (0) | 2024.06.22 |
---|---|
#121. [LeetCode / MySQL] 176. Second Highest Salary (0) | 2024.06.22 |
#119. [LeetCode / MySQL] 1527. Patients With a Condition (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 |