Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Query to return PK sequence gap ??
On Tue, 09 Oct 2007 12:15:50 -0700, Jagjeet Singh
<jagjeet.malhi_at_gmail.com> wrote:
>
>SQL> select rownum from (select 1 from dual connect by level <=
>&max_no)
> 2 minus
> 3 select emp_id from emp_test
> 4 /
>
>Enter value for max_no: 8
>
> ROWNUM
>----------
> 2
> 4
> 6
> 7
> 8
Very nice! Thanx.
B. Received on Tue Oct 09 2007 - 16:00:49 CDT