How to use update query for multiple records

I have a problem in updating details to database table.
I used table like

leadno     serviceno
1                       3
1                       6
1                       7
2                       1
2                       9

i want to update this table to

leadno      serviceno
1                           4
1                          5
2                         1
2                         3
2                         8

how to write query for this problem ?

Does your table also have a unique id? If not, I would imagine it would be a case of updating the rows where serviceno is 1 or 3, deleting the others, and inserting new ones. Or just dropping all five rows and inserting new ones, it’s hard to say which is quicker.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.