查询一段时间的数据(between)

写写: between... and .. 的sql 查询一段时间的数据

我看见别人有人用:

select * from n_activity_rating where row_add_time between to_date('2016-03-30','yyyy-mm-dd hh:mi:ms') and to_date('2016-04-30','yyyy-mm-dd hh:mi:ms'); 

一个查询不出来.



最后用了 :select * from 表 where 时间的字段 between date '2018-4-10' and date '2018-4-19'; 

 举例:

select * from n_activity_rating where row_add_time between date '2016-03-30' and date '2016-04-30'; 



猜你喜欢

转载自blog.csdn.net/qq_530933073/article/details/79791339