Total Pageviews

April 26, 2019

4/26/2019 09:04:00 AM
Oracle SQL :Updating  multiple columns with single query

update emp
 set (sal, comm) = ( select fld3, fld4 from emp_app where fld1 = 3)
 where comm is null;

update emp  
set sal = 1000,comm = (select comm from emp_app where fld1 = 5),
    fld4 = (select fld4 from emp_app where fld1 = 5);
 
Related Posts Plugin for WordPress, Blogger...