一次更新多个字段
update emp
set(job,sal,comm)=( select job,sal,comm form emp where ename='smith')
where ename='scott';
--表关联
update emp a
set(job,sal,comm)=( select job,sal,comm form emp where ename=a.ename)
where ename='scott';
oracle更新多个字段
一次更新多个字段
update emp
set(job,sal,comm)=( select job,sal,comm form emp where ename='smith')
where ename='scott';
--表关联
update emp a
set(job,sal,comm)=( select job,sal,comm form emp where ename=a.ename)
where ename='scott';