Oracle 多表关联如何更新多个字段

2024-12-16 21:05:44
推荐回答(1个)
回答1:

参考如下语法
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
  );