mysql删除表中同时重复的字段

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

猜你喜欢

转载自blog.csdn.net/m0_49412847/article/details/121166535