update Informix table with joins

前端 未结 5 986
执笔经年
执笔经年 2021-01-17 14:35

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.ke         


        
5条回答
  •  盖世英雄少女心
    2021-01-17 15:02

    your syntax error is table1.code

    set table1.code = 100
    

    change this into

    set a.code = 100
    

    Full code

    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')
    

提交回复
热议问题