Update data when duplicate keys found on import (add ON DUPLICATE KEY UPDATE) code example
Example 1: mysql insert on dupèlicate
INSERT INTO table_name(c1)
VALUES(c1)
ON DUPLICATE KEY UPDATE c1 = VALUES(c1) + 1;
Example 2: mysql on duplicate key update
UPDATE t1 SET c=c+1 WHERE a=1 OR b=2 LIMIT 1;