MYSQL DateTime现在()+5天/小时/分钟/秒?

10

我正在寻找一种方法,在向mysql插入数据时,使用now()修改日期时间。

例如:

updateuserssetexpires= NOW()+5days where...


你是在插入还是更新? - ypercubeᵀᴹ
1个回答

16
update users set expires=  NOW() + interval 5 day where ...;

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接