
merge into 用法：（在插入或更新，或者批量更新时，使用 merge into 写法，效率更高）

Merge into的基本语法：

语法如下：
MERGE [INTO [schema .] table [t_alias]
USING [schema .] { table | view | subquery } [t_alias]
ON ( condition )
WHEN MATCHED THEN [merge_update_clause ]
WHEN NOT MATCHED THEN [merge_insert_clause];

通俗点就是如下的语法：
MERGE INTO [表名] [表别名]
USING ( [查询内容] )[或者像表查询一样的语句]
ON ([条件表达式] AND [...]...)
WHEN MATCHED THEN [匹配的update操作]
WHEN NOT MATCHED THEN [不匹配的insert操作]


参考：

https://www.cnblogs.com/onlookers/p/4270418.html

http://t.zoukankan.com/yhoralce-p-7482614.html
