使用联接更新Informix表 [英] update Informix table with joins
本文介绍了使用联接更新Informix表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是Informix更新的正确语法吗?
Is this the correct syntax for an Informix update?
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'发生语法错误'消息,但看不到出了什么问题.
I get the generic -201 'A syntax error has occurred' message, but I can't see what's wrong.
推荐答案
您的语法错误是table1.code
your syntax error is 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')
这篇关于使用联接更新Informix表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文