oracle查询、删除表中相同的数据

delete FROM tablename a   WHERE rowid > ( SELECT min(rowid)   FROM tablename b   WHERE b.id = a.id and b.name=a.name);

select *  FROM tablename a   WHERE rowid > ( SELECT min(rowid)   FROM tablename b   WHERE b.id = a.id and b.name=a.name);

posted @ 2013-08-24 10:55  柠檬绿松  阅读(431)  评论(0编辑  收藏  举报
View Code