码迷,mamicode.com
首页 > 数据库 > 详细

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

时间:2020-11-17 12:27:48      阅读:12      评论:0      收藏:0      [点我收藏+]

标签:mysq   source   异常   过程   log   配置   select   tle   led   

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

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

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

标签:mysq   source   异常   过程   log   配置   select   tle   led   

原文地址:https://www.cnblogs.com/magita/p/13958496.html

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