`
i380
  • 浏览: 16026 次
社区版块
存档分类
最新评论

MySql 时间间隔 与 当前时间5分钟之前

 
阅读更多

select * from tb_user where signtime between date_add(now(), interval - 5 minute) and now()

 

列出当前时间与5分钟之内的 用户记录 

 

其中 interval - 5 minute 为间隔时间 

now() 为数据库当前时间 

 

附录

今天在学习存储过程中 mysql 抛出如下异常

1436 - Thread stack overrun

解决方案

修改mysql 的配置文件 my.ini 

thread_stack = 128K

可以将标红处的数值改大点

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics