我有这个问题。
update
(
select pt.poid_id0, umt.plan_id
from norie.plan_t_test pt
join norie.UAS_MAPPING_TEST umt on (pt.poid_id0 = umt.plan_id)
)
set plan_id = poid_id0
where poid_id0 <> plan_id;
但显示ORA-01779。请帮忙。
答案 0 :(得分:0)
更新查询总是很棘手。尝试合并。
MERGE INTO uas_mapping_test t1
USING
(
select pt.poid_id0, umt.plan_id
from norie.plan_t_test pt
join norie.UAS_MAPPING_TEST umt on (pt.poid_id0 = umt.plan_id)
) ta ON poid_id0 <> plan_id
WHEN MATCHED THEN UPDATE
set plan_id = poid_id0