Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL question
Try this:
select min(nr) from table
where nr not in (select rownum from a_big_enough_table);
Burkhard Schultheis wrote:
> Hallo,
>
> if I have the following table:
>
> Nr Text
> -- ----
> 1 'Text1'
> 2 'Text2'
> 4 'Text3'
>
> I want to search for the first 'free' Nr, which should be 3 in this
> case. How to do it with one select?
> Thank you in advance!
>
> Burkhard Schultheis
> Tele Data
Received on Sat Dec 26 1998 - 15:41:30 CST
![]() |
![]() |