| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.tools -> Re: selecting first row of a view
"Gerrit-Jan Linker" <gjlinker_at_oraxcel.com> wrote in message
news:9iq81l$sb0$1_at_neptunium.btinternet.com...
> select * from your_view where rownum <=1
>
> Note that you need an order by clause to make it a bit more specific which
> row you will fetch. Otherwise it will be roulette as to which row will be
> selected...
Unfortunately, the WHERE clause is used before the ORDER BY - so if rownum <= 1 is used there will be only one record to be ordered...
Andy Received on Mon Jul 16 2001 - 08:47:03 CDT
![]() |
![]() |