For example I have the following test table
id Col1 Col2 1 6 1 2 2 3 3 9 5 4 16 8
Using below SQL for Insert/Update
INSERT INTO test (id,Col1,Col2) VALUES (1,1,1),(2,2,3),(3,9,3),(4,10,12) ON DUPLICATE KEY UPDATE Col1=VALUES(Col1),Col2=VALUES(Col2);
You need to login in order to like this post: click here
YOU MIGHT ALSO LIKE