更新字段 在mysql 中用习惯了
update tb1 a,tb2 b set a.name=b.name where a.id=b.id and a.age=10
放到oracle里缺失set关键字
改成
update tb1 a set a.name=(select name from tb2 b where a.id=b.id)
where a.age=10
本文介绍了一种从MySQL风格的更新语句转换为Oracle兼容格式的方法。具体示例展示了如何修正缺失的SET关键字,并使用子查询实现跨表更新。
更新字段 在mysql 中用习惯了
update tb1 a,tb2 b set a.name=b.name where a.id=b.id and a.age=10
放到oracle里缺失set关键字
改成
update tb1 a set a.name=(select name from tb2 b where a.id=b.id)
where a.age=10
1万+

被折叠的 条评论
为什么被折叠?