数据库
首页 > 数据库> > MERGE Statement in SQL Explained

MERGE Statement in SQL Explained

作者:互联网

MERGE Statement in SQL Explained

Prerequisite – MERGE Statement 
As MERGE statement in SQL, as discussed before in the previous post, is the combination of three INSERT, DELETE and UPDATE statements. So if there is a Source table and a Target table that are to be merged, then with the help of MERGE statement, all the three operations (INSERT, UPDATE, DELETE) can be performed at once.

A simple example will clarify the use of MERGE Statement.

Example:
Suppose there are two tables: 

 

标签:contains,Explained,MERGE,Statement,SQL,table,ID
来源: https://www.cnblogs.com/chucklu/p/16543901.html