mysql时间字段加减

时间:2021-04-07 11:35:14   收藏:0   阅读:0

update 20210406 set recordTime=date_add(recordTime,INTERVAL -5 hour) where id>2;

update 20210406 set recordTime=date_add(recordTime,INTERVAL -5 minute) where id>2;

update 20210406 set recordTime=date_add(recordTime,INTERVAL -5 second) where id>2;

 

 

参考:https://www.cnblogs.com/chuanzhang053/p/9228798.html

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!