Home » Mysql » Update a column in MySQL

Update a column in MySQL

Posted by: admin April 26, 2018 Leave a comment


I have a table table1 with three columns and a bunch of rows:


I want to update col_a with a set of values (i.e. leaving col_b unchanged), something like this:

INSERT INTO table1 AS t1 (key_col, col_a) VALUES ("k1", "foo"), ("k2", "bar");

But it doesn’t work, how do I do this?