Oracle中刪除表中相同記錄的分析
分兩種情況:
1,刪除所有字段均相同的行:
create table tablexxx as (select * from tableyyy group by col1,col2,col3…)
drop table tableyyy
create table tableyyy as (select * from tablexxx)
drop table tablexxx
2,表中有id(PK)列,刪除其它所有字段取值相同的行:
delete b where id not in
(
select min(id) from B
group by col1,col2,col3...
)
posted on 2006-11-04 15:05
凌宇 閱讀(880)
評論(0) 編輯 收藏