oracle 查询时间问题
发布时间:2020-12-12 14:06:24 所属栏目:百科 来源:网络整理
导读:方法一:select * from 表名 where time between to_date('2012-06-18 00:00:00','yyyy-mm-dd hh24:mi:ss') and to_date('2012-06-18 23:59:59','yyyy-mm-dd hh24:mi:ss');方法二:select * from 表名 where to_char(indate,'yyyy-mm-dd')='2012-06-18';方法
方法一:select * from 表名 where time between to_date('2012-06-18 00:00:00','yyyy-mm-dd hh24:mi:ss') and to_date('2012-06-18 23:59:59','yyyy-mm-dd hh24:mi:ss');方法二:select * from 表名 where to_char(indate,'yyyy-mm-dd')='2012-06-18';方法三:select * from 表名 where trunc(indate)=to_date('2012-06-18','yyyy-mm-dd'); (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |