Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Getting first/last record
HI,
Thanks for your Quick reply, the only thing that wories me is that the
time does not actually show up, is it to second resolution?
even if i do a "SELECT SYSDATE FROM DUAL;" it does not show the time.
my oracle 8 bible says time is available , but does not go into it.
All you book writers pay attention.
steve
Brian Peasland <peasland_at_email.msn.com> wrote:
> >Being a bit of a newbee, to oracle8 can anybody help with the following.
> >1.How to get the first record in an ordered table
> >2 How to get the last record in an ordered table.
> >the order being on date then time.
>
>
> The Oracle DATE format stores both the date and the time in one field. So
> you can just query the date field. Assuming the table is named 'TABLEX' and
> the date field is labelled 'COLX', try this:
>
> SELECT min(COLX), max(COLX) from TABLEX;
>
> Hope that helps,
> Brian Peasland
> peasland_at_msn.com
Received on Thu Jul 15 1999 - 01:06:23 CDT