I have a table with two columns a and b. Something like :
a | b
+----+----+
x | l
y | m
z | n
Using a single mysql update query, I want to update a column in many rows ...
update tableName set b = l1,m1,n1 where a= x,y,z respectively.
what should the update query for this be like?
Editing my question to make it more clear : I dont want to append a 1 in the column values. I want to update them to new values which are not like the old ones. So is there any way to do that using a single MYSQL query?
Basically, I want to combine these queries into one :
update tableName set b=newVal, where a=something;
update tableName set b=anotherNewVal, where a=something_else;
update tableName set b=yetAnotherNewVal, where a=something_else_again;
Thanks much !