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

Home -> Community -> Usenet -> c.d.o.server -> Re: a simple question

Re: a simple question

From: Uwe Schneider <uwe.schneider_at_xlink.net>
Date: Thu, 25 Nov 1999 16:05:21 +0100
Message-ID: <383D5031.B4A60B1B@xlink.net>


Hi!

Parvinder Singh wrote:
>
> hi all
>
> if i execute a querry and if that querry's output is a set of records
> ..so it will return back all the records but i want the querry to return
> just the first record from that set of records and not the remaining
> records ....any idea ?

In Oracle SQL you can use the ROWNUM pseudocolumn in this sense:

WHERE ROWNUM <= 1

, but this is not portable to other RDBMS's.

If you have an embedding application logic you open a cursor, perform one fetch, and close that cursor again.

Regards!

--
uwe.schneider_at_xlink.net Received on Thu Nov 25 1999 - 09:05:21 CST

Original text of this message

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