Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: a simple question
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