当前位置:网站首页>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.
边栏推荐
- idea用debug调试出现com.intellij.rt.debugger.agent.CaptureAgent,导致无法进行调试
- What should we pay attention to when developing B2C websites?
- How to choose the right chain management software?
- What about wechat mall? 5 tips to clear your mind
- Evolution of Baidu intelligent applet patrol scheduling scheme
- Node-RED系列(二九):使用slider与chart节点来实现双折线时间序列图
- QT realizes signal transmission and reception between two windows
- Uncover the practice of Baidu intelligent testing in the field of automatic test execution
- Tdengine can read and write through dataX, a data synchronization tool
- Generics, generic defects and application scenarios that 90% of people don't understand
猜你喜欢

如何獲取GC(垃圾回收器)的STW(暫停)時間?

Wechat applet - simple diet recommendation (2)

Principle and performance analysis of lepton lossless compression

如何正确的评测视频画质

Apache DolphinScheduler 系统架构设计

What are the advantages of the live teaching system to improve learning quickly?

Generics, generic defects and application scenarios that 90% of people don't understand

剪掉ImageNet 20%数据量,模型性能不下降!Meta斯坦福等提出新方法,用知识蒸馏给数据集瘦身...

Why does everyone want to do e-commerce? How much do you know about the advantages of online shopping malls?

90%的人都不懂的泛型,泛型的缺陷和应用场景
随机推荐
Mysql80 service does not start
百度智能小程序巡检调度方案演进之路
Why do offline stores need cashier software?
Flutter development: use safearea
基于单片机步进电机控制器设计(正转反转指示灯挡位)
Tdengine connector goes online Google Data Studio app store
MySQL数字类型学习笔记
What are the advantages of the live teaching system to improve learning quickly?
Kotlin Compose 与原生 嵌套使用
oracle和mysql批量Merge对比
From "chemist" to developer, from Oracle to tdengine, two important choices in my life
Understand the window query function of tdengine in one article
Tutorial on building a framework for middle office business system
From "chemist" to developer, from Oracle to tdengine, two important choices in my life
Kotlin compose multiple item scrolling
View Slide
H.265编码原理入门
Kotlin compose and native nesting
揭秘百度智能测试在测试自动执行领域实践
What should we pay attention to when entering the community e-commerce business?