Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Select one row
Whith that you only get the first if you have additional where statements.
The rownum represents the a serie in which kind you have inserted your
records.
eg. select * from table where rownum=1 returns the first inserted record
select * from table where rownum=1 and fieldcondition returns the really first record
Perhaps you should also consider to use
select * from table where distinct-Keys=(select min(distinct-Keys) from
table)
replace distinct key in whatever you mean.
Regards
Nicolas Bronke
Sven Heins schrieb in Nachricht <364954BC.BB13151A_at_solution42.de>...
>Kenneth Herskedal wrote:
>
>> How can I select only the first row from a table.
>>
>> My select statement returns several rows, but I'm only interested in the
>> first row of the result set.
>
>Hi Kenneth,
>
>try ...where rownum = 1...
>
Received on Wed Nov 11 1998 - 14:41:23 CST