Reputation: 3218
Hej,
I need to mass-update a table. Am I allowed to use mysql's "LOAD DATA INFILE" Statement together with "INSERT … ON DUPLICATE KEY UPDATE" statements to fulfill my task?
Upvotes: 0
Views: 6145
Reputation: 65537
Depending on your exact requirements, you may be able to accomplish this using the REPLACE
option of LOAD DATA INFILE
. From the manual:
Example:
LOAD DATA INFILE '/tmp/data.txt'
REPLACE INTO TABLE your_table
(column1, column2, ...)
Upvotes: 3