Answers for "update using case in mysql"

SQL
0

update using case in mysql

UPDATE `table` SET `uid` = CASE
    WHEN id = 1 THEN 2952
    WHEN id = 2 THEN 4925
    WHEN id = 3 THEN 1592
    ELSE `uid`
    END
WHERE id  in (1,2,3)
Posted by: Guest on May-11-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language