码迷,mamicode.com
首页 > 数据库 > 详细

去重 oracle

时间:2016-07-05 18:41:09      阅读:301      评论:0      收藏:0      [点我收藏+]

标签:

--去重
DELETE FROM DEPR_MONTHS_LIST AWHERE (A.ASSET_ID,A.DEPR_DATE,A.UNIT_COST_ID) IN(SELECT B.ASSET_ID,B.DEPR_DATE,B.UNIT_COST_ID FROM DEPR_MONTHS_LIST B
GROUP BY B.ASSET_ID,B.DEPR_DATE,B.UNIT_COST_ID HAVING COUNT(1)>1)
AND ROWID NOT IN(SELECT MIN(ROWID) FROM DEPR_MONTHS_LIST C GROUP BY C.ASSET_ID,C.DEPR_DATE,C.UNIT_COST_ID HAVING COUNT(1)>1)

去重 oracle

标签:

原文地址:http://www.cnblogs.com/hupolinglong/p/5644302.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!