gpt4 book ai didi

sql - 使用连接更新 Informix 表

转载 作者:行者123 更新时间:2023-12-04 05:33:07 24 4
gpt4 key购买 nike

这是 Informix 更新的正确语法吗?

update table1
set table1.code = 100
from table1 a, table2 b, table3 c
where a.key = c.key
a.no = b.no
a.key = c.key
a.code = 10
b.tor = 'THE'
a.group = 4183
a.no in ('1111','1331','1345')

我收到通用的 -201“发生语法错误”消息,但我看不出有什么问题。

最佳答案

你的语法错误是 table1.code

set table1.code = 100

把这个改成
set a.code = 100

完整代码
update table1
set a.code = 100
from table1 a, table2 b, table3 c
where a.key = c.key
and a.no = b.no
and a.key = c.key
and a.code = 10
and b.tor = 'THE'
and a.group = 4183
and a.no in ('1111','1331','1345')

关于sql - 使用连接更新 Informix 表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10938270/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com