Oracle 删除重复记录的方法
2007-05-13 12:31:55 来源:WEB开发网核心提示:使用分析函数rownumber() over( partition by ... order by ...)下面是一个例子。DELETE FROM Portfolio_Prod_Summ_Ytd_MvWHERE ROWID IN (SELECT Rowind FROM (SELECT ROWID Rowind, Row
使用分析函数rownumber() over( partition by ... order by ...)
下面是一个例子。
DELETE FROM Portfolio_Prod_Summ_Ytd_Mv
WHERE ROWID IN (SELECT Rowind
FROM (SELECT ROWID Rowind,
Row_Number() Over(PARTITION BY Gmis_Prod_Code_Ref, Service_Type_Ref, Booking_Center, Client_Advisor_Gpn, As_On_Date, Client_Asst_Chf, Liabilities_Chf, Revenue_Chf, Ytd_Revenue_Chf, Client_Asst_Usd, Liabilities_Usd, Revenue_Usd, Ytd_Revenue_Usd, Client_Asst_Booking_Center, Liabilities_Booking_Center, Revenue_Booking_Center, Ytd_Revenue_Booking_Center, Dmm_Csk_Id, Ca_Name, Desk_Name, Desk_Fis_Id, Ct_Name, Ct_Fis_Id, Bs_Name, Bs_Fis_Id, Service_Type_Ref_Org, Product_Code_Type_Ref, Aum_Usd, Aum_Booking_Center, Aum_Chf, Hri_Gpn, Desk_Cccode, Ct_Cccode, Bs_Cccode, Bu_Cccode, Bu_Name, Ba_Cccode, Ba_Name ORDER BY Gmis_Prod_Code_Ref) Rownumber
FROM Portfolio_Prod_Summ_Ytd_Mv)
WHERE Rownumber > 1)
- ››oracle 恢复误删除的表和误更新的表
- ››Oracle分页查询排序数据重复问题
- ››Oracle创建dblink报错:ORA-01017、ORA-02063解决
- ››删除win8中window.old所有文件
- ››Oracle 提高SQL执行效率的方法
- ››Oracle 动态查询,EXECUTE IMMEDIATE select into...
- ››Oracle 11g必须开启的服务及服务详细介绍
- ››oracle性能34条优化技巧
- ››oracle数据库生成随机数的函数
- ››Oracle 数据库表空间容量调整脚本
- ››oracle单库彻底删除干净的方法
- ››删除Windows 7系统中多余本地连接的方法
更多精彩
赞助商链接