update card12 set upddate=card3.loddate 
from card12,card3 where card12.cardno = card3.cardno
在sql2000中是可以执行的,在oracle中就报错,提示命令行未正确结束

解决方案 »

  1.   

    你的语法不正确,oracle中的语法是 update table set column=value where。
      

  2.   


    --oracle关联更新是这么写的,说实话,我也很讨厌这种写法,但没办法
    update card12 set upddate=(
    select loddate from card3 where cardno=card12.cardno
    )
      

  3.   


    --补充下
    update card12 set upddate=(
    select loddate from card3 where cardno=card12.cardno
    );
    commit;   --更新完了还要提交,否则其他会话是看不到的
      

  4.   

    update card12,card3 set card12.upddate=card3.loddate  
    where card12.cardno = card3.cardno