update iportal_wx.inviterelationshipcycle as A,
(select * from iportal_wx.register where register_ctime<current_timestamp()
AND register_ctime>ADDDATE(current_timestamp(),-1)) as B
set A.IsAttentionHNLLGJ='Y'
where A.MDN_PY=B.user_phone;
时间对象的数据类型均为datetime
mysql update操作 出现incorrect datetime value
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
1条回答 默认 最新
- danielinbiti 2015-06-07 06:59关注
update iportal_wx.inviterelationshipcycle as A set A.IsAttentionHNLLGJ='Y' where exists(select 1 from iportal_wx.register where register_ctime<current_timestamp() AND register_ctime>ADDDATE(current_timestamp(),-1) and A.MDN_PY=user_phone);
解决 无用评论 打赏 举报