Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SYSDATE in where clause

SeshuGiriFeb 16 2010 — edited Feb 16 2010
Hi,

I have a table with data column in it. It stored date with timestamp.

While selecting rows from table if I use
SELECT COUNT(*) FROM TEMPTBL 
WHERE in_date = SYSDATE
returns 0 rows
SELECT COUNT(*) FROM TEMPTBL 
WHERE TRUNC(in_date) = TRUNC(SYSDATE)
returns 10 rows

How to avoid trunc?
This post has been answered by 730428 on Feb 16 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 16 2010
Added on Feb 16 2010
2 comments
14,761 views