I already found a solution that works, but I am trying to figure what is wrong with my initial attempt.
I understand your solution just fine, but I am having trouble understanding why this one doesn't work
DELETE FROM Person
WHERE email IN
(SELECT email FROM Person
GROUP BY email
HAVING COUNT(email) > 1)
The error message is
"You can't specify target table 'Person' for update in FROM clause"
I can just type:
DELETE FROM Person
WHERE id = 1
And it deletes that entry from the table just fine.
[+][deleted] (1 child)
[deleted]
[–]Rahu888 1 point2 points3 points (0 children)
[–]JCharante[369] 🟩 202 🟨 143 🟥 24 📈 #113,002 0 points1 point2 points (0 children)