当前位置:网站首页>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.
边栏推荐
- 【OpenCV 例程200篇】219. 添加数字水印(盲水印)
- 为什么不建议你用 MongoDB 这类产品替代时序数据库?
- On July 2, I invite you to TD Hero online press conference
- Coordinate system of view
- Gradientdrawable get a single color
- Optimize database queries using the cursor object of SQLite
- Viewpager pageradapter notifydatasetchanged invalid problem
- 一文读懂TDengine的窗口查询功能
- The most comprehensive promotion strategy: online and offline promotion methods of E-commerce mall
- Small program startup performance optimization practice
猜你喜欢
解决Navicat激活、注册时候出现No All Pattern Found的问题
The comparison of every() and some() in JS uses a power storage plan
Three-level distribution is becoming more and more popular. How should businesses choose the appropriate three-level distribution system?
Officially launched! Tdengine plug-in enters the official website of grafana
Roll up, break through 35 year old anxiety, and animate the CPU to record the function call process
卷起来,突破35岁焦虑,动画演示CPU记录函数调用过程
Develop and implement movie recommendation applet based on wechat cloud
Windows uses commands to run kotlin
代码语言的魅力
百度APP 基于Pipeline as Code的持续集成实践
随机推荐
MySQL installation configuration and creation of databases and tables
Tdengine already supports the industrial Intel edge insight package
写入速度提升数十倍,TDengine 在拓斯达智能工厂解决方案上的应用
Cross process communication Aidl
百度交易中台之钱包系统架构浅析
Understand the window query function of tdengine in one article
Why does everyone want to do e-commerce? How much do you know about the advantages of online shopping malls?
硬核,你见过机器人玩“密室逃脱”吗?(附代码)
【系统设计】指标监控和告警系统
Evolution of Baidu intelligent applet patrol scheduling scheme
双容水箱液位模糊PID控制系统设计与仿真(Matlab/Simulink)
如何正确的评测视频画质
MySQL字符类型学习笔记
[NTIRE 2022]Residual Local Feature Network for Efficient Super-Resolution
[sourcetree configure SSH and use]
[NTIRE 2022]Residual Local Feature Network for Efficient Super-Resolution
Fluent development: setting method of left and right alignment of child controls in row
Officially launched! Tdengine plug-in enters the official website of grafana
基于单片机步进电机控制器设计(正转反转指示灯挡位)
Observation cloud and tdengine have reached in-depth cooperation to optimize the cloud experience of enterprises