User Tools

Site Tools


kurs:merge_with_table

Differences

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

Link to this comparison view

kurs:merge_with_table [2014/09/10 21:22] (current)
Line 1: Line 1:
 +<​code>​ 
 +merge into accountants a 
 +using employees e 
 +on (e.last_name = a.last_name and e.first_name = a.first_name) 
 +when matched then 
 + ​update set salary = e.salary where last_name = '​Abel'​ 
 +when not matched then 
 +insert (first_name,​ last_name, salary) values (e.first_name,​ e.last_name,​ e.salary) 
 +</​code>​
kurs/merge_with_table.txt · Last modified: 2014/09/10 21:22 (external edit)