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

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

本文链接:
https://blog.csdn.net/a470740128/article/details/84472854  

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

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