【发布时间】:2026-02-17 14:30:01
【问题描述】:
我想通过 sdo.status=active 进行两次连接和选择来同时更新 3 个表的 3 列:
select sdo.status, sc.status, sps.status from table1 sdo, table2 sc, table3 sps
where sdo.uuid_table1 = sc.uuid_table1
and sps.uuid_table3 = sc.table3
and sdo.status='active';
我的目标是像伪代码一样更新此选择的状态:
update set
sc.status='inactive',
sps.status='inactive',
sdo.status='inactive';
可以在 oracle 中做到这一点吗?我尝试了这么多请求,没有一个更新考虑加入。
我的表中没有主键/外键。
【问题讨论】:
-
您可能想通过 Google 搜索以下错误:ORA-01776。
标签: sql oracle sql-update