Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Syntax to return first record - Oracle ??
Remember however, that min and max are just that, whereas first and last (which is what you asked for) are completely different. In some cases, however, they will return the results. Just don't expect that to work all the time.
jason <jfielding_at_trinitech.co.uk> wrote in message
news:8emb0v$vsf$1_at_trinitech.demon.co.uk...
> Thanks Pol, that worked a treat!
> Jason
>
> pol15_at_my-deja.com wrote in message <8ec1mb$n33$1_at_nnrp1.deja.com>...
> >
> >
> >hi jason,
> >
> >you could write ...
> >
> >select min(changedatetime) from tab1
> >
> >or ...
> >
> >select max(changedatetime) from tab1
> >
> >pol.
> >
> >
> >
> >In article <8ebsfv$86l$1_at_trinitech.demon.co.uk>,
> > "jason" <jfielding_at_trinitech.co.uk> wrote:
> >> Hi,
> >> Could anyone tell me how (and if it's possible) to create a SQL query
that
> >> returns only the first (or last) record. Through Access, I could
write :
> >>
> >> select top 1 changedatetime
> >> from tab1
> >> order by changedatetime;
> >>
> >> Is there an equivelant key word to 'top' (or 'bottom') when using
standard
> >> SQL ?
> >> TIA
> >> Jason
> >>
> >>
> >
> >
> >Sent via Deja.com http://www.deja.com/
> >Before you buy.
>
>
Received on Tue May 02 2000 - 00:00:00 CDT
![]() |
![]() |