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: How to return just one row after finding it

Re: How to return just one row after finding it

From: Ted Knijff <knijff_at_bigfoot.com>
Date: Fri, 01 Oct 1999 21:53:11 +0200
Message-ID: <37F51126.700D7ADE@bigfoot.com>


I think this will still search all PartDate entries and return only one. You are best of with an index on PartNo and PartDate and then your first option will be fastest.
The second option will search all PartDate entries and return one always.

Ted

> I think
>
> select Max(PartDate)
> from PartHistory
> where PartNumber=1000
>
> is a possibility finding one record using standard SQL
>
> select PartDate
> from PartHistory
> where PartNumber=1000 and RowNum=1
>
> is another way using ORACLE specific SQL


Received on Fri Oct 01 1999 - 14:53:11 CDT

Original text of this message

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