How to update a same column in different rows with different values in single query?

UPDATE table SET `status`= CASE WHEN (id=”4″) THEN “1” ELSE “0” END;

o/p

result print screen

Leave a Reply