Oracle 更新连接语法不起作用
这是我在 MS Access 中的工作查询...
UPDATE Caxnode AS A INNER JOIN Caxnode AS B ON A.node_alias = B.node_alias
SET A.partition_Type = 'LDOM', A.node_mode = 'LOGICAL', A.host_id = b.host_id, A.num_of_proc = b.num_of_proc
WHERE (((A.node_mode)='virtual' Or (A.node_mode)='regular') AND ((B.partition_Type)='LDOM'));
这在 Oracle 中不起作用,我在 google 上搜索并读到更新不适用于 Oracle 中的内部联接。
有人可以帮我将此查询翻译为在 Oracle 上工作吗?
This is my working query in MS Access...
UPDATE Caxnode AS A INNER JOIN Caxnode AS B ON A.node_alias = B.node_alias
SET A.partition_Type = 'LDOM', A.node_mode = 'LOGICAL', A.host_id = b.host_id, A.num_of_proc = b.num_of_proc
WHERE (((A.node_mode)='virtual' Or (A.node_mode)='regular') AND ((B.partition_Type)='LDOM'));
This doesn't work in Oracle, I googled and read that update doesn't work with inner join in Oracle..
Can someone please help me translate this query to work on Oracle?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
JOIN in Update 是 MS 对 UPDATE 的专有扩展。通过谷歌搜索Oracle更新语法,我相信你可以将其写为:
此语法确实确保如果 B 端有多行,您将收到错误,而在 Access/SQL Server 中,它会默默地随机选择其中一行。
JOIN in Update is a MS proprietary extension to UPDATE. From Googling Oracle Update Syntax, I believe you can write it as:
This syntax does ensure that if there are multiple rows on the B side, you'll get an error, whereas in Access/SQL Server, it will silently just pick one of the rows at random.