User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

kurs:merge [2014/09/10 21:22]
kurs:merge [2014/09/10 21:22] (current)
Line 1: Line 1:
 +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)