leetcode

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit ffb04bea513a5906c4675f2c4a68c61d2beb4d19
parent e32266734db8bccd02b390ad90523bfd81259641
Author: AndrewLockVI <andrewlaack1@gmail.com>
Date:   Thu, 13 Apr 2023 16:47:11 -0500

Delete Duplicate emails sql query

Diffstat:
Adelete-duplicate-emails/delete-duplicate-emails.sql | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/delete-duplicate-emails/delete-duplicate-emails.sql b/delete-duplicate-emails/delete-duplicate-emails.sql @@ -0,0 +1,5 @@ +--Delete the Person P from the Person table +DELETE P +FROM Person P, Person P1 +--Deletes when emails are matched and the id of the selected person is greater than the other +WHERE P.email=P1.email AND P.id>P1.id