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
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);