Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: selecting first row of a view

Re: selecting first row of a view

From: Gerrit-Jan Linker <gjlinker_at_oraxcel.com>
Date: Sat, 14 Jul 2001 20:56:36 +0100
Message-ID: <9iq81l$sb0$1@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...

Hope this helps,

--
Gerrit-Jan Linker
SQL*XL: addin for Excel for easy access to Oracle databases
http://www.oraxcel.com


"james A" <james.akerman_at_btinternet.com> wrote in message
news:9iq7h7$huv$1_at_uranium.btinternet.com...

> I am trying to select the first row of all the columns of data produced by
a
> view using a statement such as:
>
> select first * from V_viewname;
>
> I know that 'first' is not a keyword but I was wondering if there is a
> keyword that I could use or a way I could get around this
>
> any help apprechiated
> thanks.
>
>
Received on Sat Jul 14 2001 - 14:56:36 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US