Answer the question
In order to leave comments, you need to log in
How to update multiple rows in MS SQL SERVER?
There is an array that contains strings like:
"id" => "value"
Example:
"43972" -> "9805,52,1,1553246795;9686,108,2,1552987794",
"43912" -> "9155,48 ,2,1553025388;8787,49,3,1553025990",
"43972" -> "98123,52,1,1553246795;9686,108,2,1552987712"
The task is to create a query that will update all rows at once.
An example of what this looks like:
UPDATE table_name SET colum_name1 = VALUES('id1', 'id2', 'id3') WHERE colum_name3 IN ('value1', 'value2', 'value3')
Help solve the issue.
PS: You can’t use several, you need exactly 1, which will be compiled by the for loop.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question