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

Home -> Community -> Usenet -> c.d.o.misc -> Re: fast select of first row on Oracle table...

Re: fast select of first row on Oracle table...

From: Mark Gumbs <mgumbs_at_hotmail.com>
Date: Thu, 4 Mar 1999 10:49:49 -0000
Message-ID: <36de6405.0@145.227.194.253>


You could try replacing recno with rowid in your query. If you are not bothered about the order in which the data is comming out of your table

select * from dbstruct where rownum = 1;

Mark

tim.mcconechy_at_runtime.dk wrote in message <7blnb1$1ki$1_at_nnrp1.dejanews.com>...
>How can I select the first row in a table...
>I thought of doing.
>select * from dbstruct where recno=(select min(recno) from dbstruct)
>but this invlove table scanning which shouln't be necessary...
>
>I just want the first row...Fast!
>
>Please help...
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Received on Thu Mar 04 1999 - 04:49:49 CST

Original text of this message

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