PHP Code:SQL> create table test as select rownum rno from user_objects where rownum<10;
Table created.
Elapsed: 00:00:00.47
SQL> select * From test;
RNO
==========
1
2
3
4
5
6
7
8
9
9 rows selected.
Elapsed: 00:00:00.78
SQL> delete from test where rno=6;
1 row deleted.
Elapsed: 00:00:00.40
SQL> commit;
Commit complete.Elapsed: 00:00:00.25
SQL> select rno+1 from test a
2 where not exists (select null from test b
3 where b.rno=a.rno+1)
4 /
RNO+1
==========
6
10
Elapsed: 00:00:00.19
http://www.experts-exchange.com/Data..._20815063.html




Reply With Quote