Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to return just one row after finding it
Hi.
Try using "where PartNumber = 1000 AND rownum = 1"
Michael.
In article <37f4cc14.346267062_at_news.us.dell.com>,
md_at_doc.us.dell.com wrote:
> Hi all,
> How would I write a query so, that it will stop searching as soon as
> it finds the first record in the table?
> The reason I would like to do that is so, the query doesn't go on and
> search for next 100,000 records for other records matching the same
> criteria. I just want the first one matching criteria and stop.
>
> For example: I want to find PartDate where PartNumber = 1000 from
> PartHistory table.
>
> Thanks in advance,
> -MD
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Oct 01 1999 - 13:39:25 CDT
![]() |
![]() |