///
SELECT serverip FROM servers GROUP BY serverip HAVING COUNT(*) > 1;
///	  
	
///  
SELECT max(id) as id, serverip FROM servers WHERE serverip in 
( 
	SELECT serverip  FROM servers GROUP BY serverip HAVING COUNT(*) > 1 
) GROUP BY serverip;
///
   
///
DELETE servers FROM servers 
INNER JOIN ( 
				SELECT max(id) as id, serverip FROM servers WHERE serverip in 
				(
					SELECT serverip FROM servers GROUP BY serverip HAVING COUNT(*) > 1
				) GROUP BY serverip
			) duplic on duplic.serverip = servers.serverip
WHERE servers.id < duplic.id;
///
Categories: MySql language

5 Comments

씨맥스API · 18/10/2024 at 20:02

… [Trackback]

[…] Find More Information here to that Topic: durukanbal.com/2022/12/13/mysql-find-duplicate-columns-and-delete/ […]

10 mg adderall · 13/11/2024 at 04:36

… [Trackback]

[…] Find More Info here to that Topic: durukanbal.com/2022/12/13/mysql-find-duplicate-columns-and-delete/ […]

dark hawk vape cartridge · 13/11/2024 at 05:40

… [Trackback]

[…] Read More on that Topic: durukanbal.com/2022/12/13/mysql-find-duplicate-columns-and-delete/ […]

ผลิตเสื้อยืด · 27/11/2024 at 07:02

… [Trackback]

[…] Read More Info here on that Topic: durukanbal.com/2022/12/13/mysql-find-duplicate-columns-and-delete/ […]

Destination Wedding in France · 06/12/2024 at 04:40

… [Trackback]

[…] Read More Information here to that Topic: durukanbal.com/2022/12/13/mysql-find-duplicate-columns-and-delete/ […]

Leave a Reply

Avatar placeholder