当前位置: 代码迷 >> Oracle开发 >> update不了,这语句要如何写
  详细解决方案

update不了,这语句要如何写

热度:14   发布时间:2016-04-24 07:50:59.0
update不了,这语句要怎么写啊
两张关联表进行update

update   user_job   set   user_name=b.new_name   where   user_no   in   (select   user_no_old   from   user_class   b)

就是把两张表相同user_no的user_name给换了!!!可是怎么都不能   update


------解决方案--------------------
update t01_sales a set a.t01name = (select b.t01name from temp1 b where b.t00salesno = a.t00salesno)
------解决方案--------------------
楼上的语句对了一半。像你样写,会把整个表更新了。
update user_job set user_name=(select user_class.new_name from user_class where user_job.user_no=user_class.user_no_old) where user_job.user_no in(select user_no_old from user_class)
  相关解决方案