update table sql multiple set

Solutions on MaxInterview for update table sql multiple set by the best coders in the world

showing results for - "update table sql multiple set"
Ainsleigh
26 Aug 2019
1-- CANT do multiple sets but can do case
2UPDATE table
3SET ID = CASE WHEN ID = 2555 THEN 111111259 
4              WHEN ID = 2724 THEN 111111261
5              WHEN ID = 2021 THEN 111111263
6              WHEN ID = 2017 THEN 111111264
7         END
8WHERE ID IN (2555,2724,2021,2017)
9