SQL 删除重复记录,只保留一条记录

DELETE 
FROM
py_bond_shenzhen_exchange_opinion_2_1 
WHERE
id NOT IN (SELECT id FROM (SELECT min(id) AS id FROM py_bond_shenzhen_exchange_opinion_2_1 GROUP BY notice_date, notice_title) temp)

 

posted on 2019-08-07 10:36  swustqiu  阅读(384)  评论(0编辑  收藏  举报

导航