表table, 其中有字段cdate表示日期,建立cdate的索引table_cdate_indx
现在查询当天的记录,三种方法:
select * from table where to_char(cdate,'yyyymmdd')=to_char(sysdate,'yyyymmdd')
select * from table where trunc(cdate)=trunc(sysdate)
select * from table where cdate>trunc(sysdate)