Increase employees salary by 10%
update employee
set salary=salary+(salary*(10/100))
where emp_id in (Select emp_id from emp_details);
The above can be re-written as:
update employee t1
set salary=salary+(salary*(10/100))
where t1.emp_id = (Select emp_id from emp_details where emp_id=t1.emp_id);
update employee
set salary=salary+(salary*(10/100))
where emp_id in (Select emp_id from emp_details);
The above can be re-written as:
update employee t1
set salary=salary+(salary*(10/100))
where t1.emp_id = (Select emp_id from emp_details where emp_id=t1.emp_id);
Comments