Update a column in MySQL

You have to use UPDATE instead of INSERT:

For Example:

UPDATE table1 SET col_a="k1", col_b='foo' WHERE key_col="1";
UPDATE table1 SET col_a="k2", col_b='bar' WHERE key_col="2";

Leave a Comment