mysql delete fields that are duplicated at the same time in the table

DELETE
FROM
	table
WHERE
	id NOT IN (
	SELECT
		temp.mid 
	FROM
		( SELECT min( id ) AS mid FROM table  GROUP BY 字段一,字段二 ) AS temp 
	)

Guess you like

Origin blog.csdn.net/m0_49412847/article/details/121166535