oracle里的date类型怎么查询

更新时间:02-06 教程 由 迷糊 分享

oracle里的date类型怎么查询?

可以转换成字符查询:

select * from tabxxx where to_char(dtcol,'yyyy-mm-dd') = '2017-10-24'

也可以用日期查询:

select * from tabxxx where dtcol >= sysdate -1;

select * from tabxxx where dtcol >= to_date('2017-10-13 18:00:00','yyyy-mm-dd hh24:mi:ss');

声明:关于《oracle里的date类型怎么查询》以上内容仅供参考,若您的权利被侵害,请联系13825271@qq.com
本文网址:http://www.25820.com/tutorial/14_2293561.html