Skip to content
Advertisement

Tag: batch-updates

MySQL Batchupdate() with ON DUPLICATE KEY UPDATE

I am using batchUpdate() to insert multiple records in a table. As per the requirement, if there is a duplicate value for a primary key while inserting it should be updated with the latest received data, hence I was trying to use ON DUPLICATE KEY UPDATE in INSERT statement. The ON DUPLICATE KEY UPDATE works good when I use a

Advertisement