当前位置:网站首页>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 do enterprises choose the appropriate three-level distribution system?
- QT event filter simple case
- 如何獲取GC(垃圾回收器)的STW(暫停)時間?
- 分布式数据库下子查询和 Join 等复杂 SQL 如何实现?
- oracle 多行数据合并成一行数据
- Why does everyone want to do e-commerce? How much do you know about the advantages of online shopping malls?
- Cent7 Oracle database installation error
- Node-RED系列(二九):使用slider与chart节点来实现双折线时间序列图
- Tdengine can read and write through dataX, a data synchronization tool
- Apache DolphinScheduler 系统架构设计
猜你喜欢
【C语言】动态内存开辟的使用『malloc』
善用兵者,藏于无形,90 分钟深度讲解最佳推广价值作品
The most comprehensive promotion strategy: online and offline promotion methods of E-commerce mall
Principle and performance analysis of lepton lossless compression
【系统设计】指标监控和告警系统
ArcGIS Pro 创建要素
The popularity of B2B2C continues to rise. What are the benefits of enterprises doing multi-user mall system?
百度APP 基于Pipeline as Code的持续集成实践
Tdengine connector goes online Google Data Studio app store
如何正确的评测视频画质
随机推荐
Single chip microcomputer principle and Interface Technology (esp8266/esp32) machine human draft
Idea debugs com intellij. rt.debugger. agent. Captureagent, which makes debugging impossible
ThreadLocal source code learning
How to use sqlcipher tool to decrypt encrypted database under Windows system
[listening for an attribute in the array]
90%的人都不懂的泛型,泛型的缺陷和应用场景
双容水箱液位模糊PID控制系统设计与仿真(Matlab/Simulink)
Getting started with Apache dolphin scheduler (one article is enough)
[two objects merged into one object]
一文读懂TDengine的窗口查询功能
Android SQLite database encryption
揭秘百度智能测试在测试自动执行领域实践
Community group buying has triggered heated discussion. How does this model work?
The comparison of every() and some() in JS uses a power storage plan
Comment obtenir le temps STW du GC (collecteur d'ordures)?
Officially launched! Tdengine plug-in enters the official website of grafana
oracle 多行数据合并成一行数据
Understand the window query function of tdengine in one article
Tdengine can read and write through dataX, a data synchronization tool
Why does everyone want to do e-commerce? How much do you know about the advantages of online shopping malls?