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
凌宇 阅读(870)
评论(0) 编辑 收藏