Oracle 中实现多表关联更新多个字段


update student A

  set (A.name,a.dq) =

  (select B.bname,b.bdq

  from newstudent B

  where B.Bid = A.id

  and A.dq = 10

  )

  where exists (select 1

  from newstudent B

  where B.Bid = A.id

  and A.dq = 10

  );

 


« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3