Mbusak Baris Duplikat ing MySQL- Mbusak baris duplikat nggunakake statement DELETE JOIN

Mbusak kabeh Duplikat Baris kajaba Siji ing MySQL? [duplikat]

Tabel pangguna duwe 5 cathetan kanthi duplikat email [email protected]

Panelusuran ngasilake email duplikat ing tabel Pangguna:

SELECT *, COUNT(email) FROM users  
GROUP BY email   
HAVING  COUNT(email) > 1;

Mbusak baris duplikat nggunakake statement DELETE JOIN

DELETE table1 FROM users table1  
	INNER JOIN users table2   
	WHERE table1.id < table2.id AND table1.email = table2.email

asil