码迷,mamicode.com
首页 > 其他好文 > 详细

postgre查询一段时间内的数据

时间:2019-08-13 13:55:02      阅读:140      评论:0      收藏:0      [点我收藏+]

标签:from   code   min   postgre   time   int   查询   post   color   

 

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经过实际核实,这方法有毛病,刚入的数据,几十秒之后才能刷的出来

postgre查询一段时间内的数据

标签:from   code   min   postgre   time   int   查询   post   color   

原文地址:https://www.cnblogs.com/xiaoliu66007/p/11345137.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!