Tag

duplicate insert

1 views collected around this technical thread.

Top Architect
Top Architect
Jul 11, 2021 · Databases

Handling Duplicate Inserts in MySQL: Strategies and MyBatis Batch Example

The article discusses efficient ways to perform bulk inserts in MySQL while avoiding duplicate records, covering techniques such as INSERT IGNORE, ON DUPLICATE KEY UPDATE, INSERT…SELECT…WHERE NOT EXISTS, REPLACE INTO, and demonstrates a practical MyBatis implementation with a unique mobile_number constraint.

INSERT IGNOREMyBatisON DUPLICATE KEY UPDATE
0 likes · 5 min read
Handling Duplicate Inserts in MySQL: Strategies and MyBatis Batch Example