当前位置:网站首页>Comparison of batch merge between Oracle and MySQL
Comparison of batch merge between Oracle and MySQL
2022-07-05 10:02:00 【51CTO】
orm Frame adoption mybatis, This blog is about batch merge merge use oracle and mysql To do the difference ,
oracle merge For more details on the merge update function, please refer to my previous blog
<!-- Batch update new associated information oracle-->
<insert id="batchSaveTipsRelatedConfig" databaseId="oracle" parameterType="com.extend.tipsConfig.model.TipsRelatedModel">
MERGE INTO t_tips_config_related A1
USING(<foreach collection="relatedTipsList" item="itm" separator="union">select #{itm.seq} seq ,
#{itm.tipsSeq} tipsSeq ,
#{itm.relaSeq} relaSeq,
#{itm.tipsContent} tipsContent
from dual
</foreach>) A2
ON(A1.tips_seq = A2.tipsSeq and A1.rela_seq = A2.relaSeq)
WHEN MATCHED THEN
UPDATE SET
A1.tips_content = A2.tipsContent
WHEN NOT MATCHED THEN
INSERT(seq , tips_seq , rela_seq, tips_content)
VALUES(A2.seq , A2.tipsSeq ,A2.relaSeq, A2.tipsContent)
</insert>
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
mysql Method :
<!-- Batch update new associated information mysql-->
<insert id="batchSaveTipsRelatedConfig" databaseId="mysql" parameterType="com.extend.tipsConfig.model.TipsRelatedModel">
REPLACE INTO t_tips_config_related(seq,tips_seq,rela_seq,tips_content)
VALUES<foreach collection="relatedTipsList" item="itm" separator=",">(#{itm.seq},
#{itm.tipsSeq},
#{itm.relaSeq},
#{itm.tipsContent})</foreach>
</insert>
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
边栏推荐
- How to empty uploaded attachments with components encapsulated by El upload
- [app packaging error] to proceed, either fix the issues identified by lint, or modify your build script as follow
- [JS sort according to the attributes in the object array]
- TDengine × Intel edge insight software package accelerates the digital transformation of traditional industries
- TDengine 连接器上线 Google Data Studio 应用商店
- [200 opencv routines] 219 Add digital watermark (blind watermark)
- TDengine 离线升级流程
- The most comprehensive promotion strategy: online and offline promotion methods of E-commerce mall
- 移动端异构运算技术-GPU OpenCL编程(进阶篇)
- Understand the window query function of tdengine in one article
猜你喜欢

What about wechat mall? 5 tips to clear your mind

Viewpager pageradapter notifydatasetchanged invalid problem

Officially launched! Tdengine plug-in enters the official website of grafana

Kotlin compose multiple item scrolling

高级 OpenCV:BGR 像素强度图

How to choose the right chain management software?

Cent7 Oracle database installation error

Observation cloud and tdengine have reached in-depth cooperation to optimize the cloud experience of enterprises

【C语言】动态内存开辟的使用『malloc』

单片机原理与接口技术(ESP8266/ESP32)机器人类草稿
随机推荐
How do enterprises choose the appropriate three-level distribution system?
About getfragmentmanager () and getchildfragmentmanager ()
Roll up, break through 35 year old anxiety, and animate the CPU to record the function call process
从“化学家”到开发者,从甲骨文到 TDengine,我人生的两次重要抉择
Solve the problem of no all pattern found during Navicat activation and registration
TDengine可通过数据同步工具 DataX读写
Tdengine already supports the industrial Intel edge insight package
Resolve the horizontal (vertical) sliding conflict between viewpager and WebView
Kotlin Compose 与原生 嵌套使用
从“化学家”到开发者,从甲骨文到TDengine,我人生的两次重要抉择
盗版DALL·E成梗图之王?日产5万张图像,挤爆抱抱脸服务器,OpenAI勒令改名
[hungry dynamic table]
Develop and implement movie recommendation applet based on wechat cloud
百度交易中台之钱包系统架构浅析
为什么不建议你用 MongoDB 这类产品替代时序数据库?
解决Navicat激活、注册时候出现No All Pattern Found的问题
卷起來,突破35歲焦慮,動畫演示CPU記錄函數調用過程
TDengine 已经支持工业英特尔 边缘洞见软件包
Uncover the practice of Baidu intelligent testing in the field of automatic test execution
How to use sqlcipher tool to decrypt encrypted database under Windows system