postgre查询一段时间内的数据

 

select * from zaiko 
where createtime between (now() - interval '3 Days') and now() ;

select * from zaiko 
where createtime between (now() - interval '5 Mins') and now()

 ps经过实际核实,这方法有毛病,刚入的数据,几十秒之后才能刷的出来

posted @ 2019-08-13 12:13  君子笑而不语  阅读(1308)  评论(0编辑  收藏  举报