oracle-日期查询

oracle数据库日期查询

方法一:select * from 表名 where 列名
    between to_date('2016-06-18 00:00:00','yyyy-mm-dd hh24:mi:ss')
    and to_date('2016-06-18 23:59:59','yyyy-mm-dd hh24:mi:ss');
方法二:select * from 表名 where to_char(列名,'yyyy-mm-dd')='2016-06-18';
方法三:select * from 表名 where trunc(time)=to_date('2016-06-18','yyyy-mm-dd');

posted on 2016-07-07 17:55  小喻哥  阅读(308)  评论(0)    收藏  举报

导航