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
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
![]() |
![]() |