Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: sysdate
Arjan van Bentem wrote:
>
> Marc Mazerolle wrote
> > where mytable.start_date between sysdate and sysdate + 7
>
> Ehhh, why search for a start date from now, until 7x24 hours from now?
>
> where trunc(activitydate) = trunc(sysdate)
>
> Arjan.
I would follow Marc's advice for one reason : if activitydate is
indexed,
the otherwise perfectly valid trunc(activitydate) will prevent (unless
you are running Oracle 8.1 and have indexed trunc(activitydate)) using
the index.
-- Regards, Stéphane Faroult Oriole Corporation ------------------------------------------------------------------ http://www.oriolecorp.com, designed by Oracle DBAs for Oracle DBAs ------------------------------------------------------------------Received on Wed Mar 31 1999 - 00:00:00 CST
![]() |
![]() |