+ 1
It is possible to update multiple columns by just separating the SET clause with a comma ( , ) and using IN for multiple rows. For example:
UPDATE table
SET Name = John , Age = 18
WHERE Id IN (1,2,3,6,19,21);
You can also use relational operators like:- <> !=
This query updates the table with the data provided where the Id is 1,2,3,6,19,21!
Hope it helped!
+ 1
The where clause could also be something like WHERE Age >= 18 and it would affect multiple rows.
+ 1
Correct.
0
UPDATE `Employees` SET `LastName` = 'Smith', `Salary` = 55000 WHERE `ID` IN (1,3);
0
ideally any change would come from a form. usually that would only be editing one of them at a time. You could have a big table and edit s bunch of rows and submit all of that and there are ways to write a loop to go through all of the submitted data so you only need the one query.