怎么查询某段日期内某个时间段的数据
如何查询某段日期内某个时间段的数据?
如果要查询某个日期区间上午10:00-12:00的信息,sql怎么写?
------解决方案--------------------
针对你的
select * from yourtable where to_char(yourtime, 'hh24mi ')> = '1000 ' and to_char(yourtime, 'hh24mi ') <= '1200 ';
改成你的表名和字段名即可
如果要查询某个日期区间上午10:00-12:00的信息,sql怎么写?
------解决方案--------------------
针对你的
select * from yourtable where to_char(yourtime, 'hh24mi ')> = '1000 ' and to_char(yourtime, 'hh24mi ') <= '1200 ';
改成你的表名和字段名即可