全部博文(41)
分类: Oracle
2008-04-23 16:38:40
insert into test_0210 values(2,'def',33);
insert into test_0210 values(3,'def',45);
commit;
SQL> select * from test_0210;
ID NAME AGE
---------- -------------------------------- ----------
1 abc 32
2 def 33
3 def 45
1.使用rowid 效率高 直接定位到数据块地址,根据需要取max rowid 或 min rowid 只适合删除少量重复数据
SQL> delete from test_0210 where rowid not in (select max(rowid) from test_0210 group by name);