更新表-0行影响
我写了一个更新命令,其语法很好,但是不影响任何行,因此它实际上不起作用。 [1] [1]: https://i.sstatic.net/mxinf.png
update T1 c, T2 dk
set c.date = dk.dates, c.field = 'event_dt'
where c.id = dk.id and c.age = dk.age and c.height = dk.height and c.country = dk.country
and c.id is not null and c.date is null and c.age is not null and c.height is not null and c.country is not null;
解决问题? 谢谢!
I wrote an UPDATE command whose syntax is good, but it doesn't affect any of the rows, so it doesn't actually work. [1]
[1]: https://i.sstatic.net/MXinf.png
update T1 c, T2 dk
set c.date = dk.dates, c.field = 'event_dt'
where c.id = dk.id and c.age = dk.age and c.height = dk.height and c.country = dk.country
and c.id is not null and c.date is null and c.age is not null and c.height is not null and c.country is not null;
how can I solve the problem?
thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议将其写为更新加入:
如果以上也没有更新任何行,则您的数据或逻辑已关闭。
I would suggest writing this as an update join:
If the above also does not update any rows, then either your data or your logic is off.