随笔- 100  文章- 0  评论- 3  阅读- 30413 

1.将某时间字段数据进行减一天,然后赋值给其他时间字段列

update t_sg_spraygun_running c set c.day_time = DATE_SUB(c.create_time, INTERVAL 1 DAY) 

 

  参考:cnblogs.com/geek233/p/16112906.html

 

2.某时间字段格式化后,重新赋值

update t_sg_spraygun_running c set c.create_time = date_format(create_time,'%Y-%m-%d 00:00:00') where id in(2, 72);

 

 posted on   曹军  阅读(23)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
点击右上角即可分享
微信分享提示