表A与B相同结构:
A表
l1  l2
1   A
2   B
3   
B表
1   A
2   B
3   
将B表中非空的L2赋值给A表的L2。
我的方法如下,已经验证实现。declare cursor c_yy is
select a.l1 l1,a.l2 l2,b.l1 ll1, b.l2 ll2 from a,b where a.l1=b.l1;v_yy c_yy%rowtype;beginopen c_yy;
loop
   fetch c_yy into  v_yy;
 exit when c_yy%notfound;
 if v_yy.ll2 is not null then
    update a set a.l2=v_yy.ll2 where a.l1=v_yy.ll1;
   end if;
end loop;
end  ;有没有更好的SQL形式来实现呢?
谢谢。