Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: sysdate & date columns
>Larry Pettit <larry.pettit_at_ps.net> a écrit dans le message :
>YTrh4.134$j4.7687_at_news.uswest.net...
>>
>> select * from table1 where date1 = sysdate
>> Is there a way to compare a date column with sysdate other than
>> converting both using to_char()?
select ... from T where date1 between trunc(sysdate)
and trunc(sysdate+1)-1/24/60/60
in other words, between today at midnite and today at 23:59:59.
it will use index on date1 if present.
--
dave mausner
Received on Thu Jan 20 2000 - 09:53:59 CST
![]() |
![]() |