加入收藏 | 设为首页 | 会员中心 | 我要投稿 安卓应用网 (https://www.0791zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 数据库 > MsSql > 正文

sql – 使用连接更新Informix表

发布时间:2020-05-24 12:44:20 所属栏目:MsSql 来源:互联网
导读:这是Informix更新的正确语法吗? update table1set table1.code = 100from table1 a, table2 b, table3 cwhere a.key = c.keya.no = b.noa.key = c.keya.code = 10b.tor = THEa.group = 4183a.no in (1111,1331,

这是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,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','1345')

(编辑:安卓应用网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读