User Tools

Site Tools


kurs:merge
merge into accountants a
using (select first_name, last_name, salary from employees where last_name = 'Abel') e
on (a.last_name = e.last_name and a.first_name = e.first_name)
when matched then
  update set a.salary = e.salary 
when not matched then
 insert values (e.first_name, e.last_name, e.salary);  
kurs/merge.txt · Last modified: 2014/09/10 21:22 (external edit)