数据库
首页 > 数据库> > 极其简单的数据库数据去重方式

极其简单的数据库数据去重方式

作者:互联网

SELECT * FROM house_item a GROUP BY a.label,a.parent_code,a.`code`,a.unit,a.floor,a.house_number HAVING count( * ) > 1)
DELETE FROM house_item
WHERE id IN(
 SELECT a.id FROM
(SELECT * FROM house_item a GROUP BY a.label,a.parent_code,a.`code`,a.unit,a.floor,a.house_number HAVING count( * ) > 1) a)

标签:count,code,GROUP,house,数据库,极其,item,简单,SELECT
来源: https://blog.csdn.net/qq_36640395/article/details/112602120