Fastest Web Hosting

how do multiple updates in mysql

0 votes
asked Aug 29, 2016 in Mysql by naseebsingh (2,160 points)

I know that we can insert multiple rows at once, but we can do also multiple update .

i combine the writedown Updates into one query .for my table .

UPDATE table SET Col1 = 4 WHERE id = 3;
UPDATE table SET Col1 = 5 WHERE id = 2;
UPDATE table SET Col2 =8 WHERE id = 5;`

But this is not working . Tell me right solution for this.

Your answer


Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

Job Board

TechnicalSharp is a technical community of developers where they are sharing their knowledge and solutions and against it they are getting the score point which help them to make profile strong which is under eyes on MNC's