【发布时间】:2015-12-14 02:34:07
【问题描述】:
我知道更新子句不适用于 Oracle 中的联接。
update table1 Pr
set code = (select t2.class_attr_value from table2 t2
where class_attr_name = 'sample' and Pr.epcclass_id = t2.epcclass_id)
如果有人可以帮助我修改我的查询,我将不胜感激,以免我收到 SQL 命令未正确结束的错误。
【问题讨论】:
-
向我们展示
table1和table2表的结构和数据。为此目的使用SQLFiddle。我看不出有什么问题。
标签: oracle