oracle sql date not later than today

For last 24 hours:

Where publish_date >= sysdate -1

or anytime today (midnight forward)

where publish_date >= trunc(sysdate)

If this is a big table, I assume you have an index on publish_date. If you use trunc(publish_date), it may not be able to use the index (untested, but run an explain plan to be sure).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)