MERGE语句是Oracle9i新增的语法,用来合并UPDATE和INSERT语句。连接条件匹配上的进行UPDATE,无法匹配的执行INSERT。这个语法仅需
MERGE语句是Oracle9i新增的语法,用来合并UPDATE和INSERT语句。连接条件匹配上的进行UPDATE,无法匹配的执行INSERT。这个语法仅需要一次全表扫描就完成了全部工作,执行效率要高于INSERT+UPDATE。
下面看个具体例子:
下面稍微修改一下例子:
,
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn