Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
Fixed spelling.
Source Link
informatik01
  • 16.5k
  • 11
  • 82
  • 112

Update mysqla column in MySQL

A simple mySql question for all you experts:

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

[key_col|col_a|col_b] 

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

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

Not working, how do I do this?


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

Update mysql column

A simple mySql question for all you experts:

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

[key_col|col_a|col_b] 

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

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

Not working, how do I do this?

Update a column in MySQL

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

[key_col|col_a|col_b] 

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?
Source Link
Muleskinner
  • 14.6k
  • 20
  • 63
  • 81

Update mysql column

A simple mySql question for all you experts:

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

[key_col|col_a|col_b] 

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

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

Not working, how do I do this?