如何更新DB2 v8 z / OS中的多行(无合并功能)
select a.Full_Name, b.Nick from
tableA a join tableB b on a.id = b.id
我需要: a.Full_Name = b.Nick
据我所知,我不能那样做
update tableA join join tableB b on a.id = b.id
set a.Full_Name = b.Nick
答案 0 :(得分:1)
您可以使用子查询:
update tableA a set a.full_name = (select nick from tableb b where a.id = b.id);