查重
select count(1),content from t_mall_longping
group by content
having count(1)>1
稳重删除重复(技术来源于 百度文心一言,好屌呀)
CREATE TABLE tmp_duplicates (
hxid INT PRIMARY KEY
);
INSERT INTO tmp_duplicates
SELECT MIN(hxid)
FROM t_mall_longping
GROUP BY content; -- 将这里替换为您要检查重复的列名
DELETE FROM t_mall_longping
WHERE hxid NOT IN (SELECT hxid FROM tmp_duplicates);
DROP TABLE tmp_duplicates;