🔴 MySQL Solution 🔴
Solution\n\nUPDATE  salary\nSET  sex = CASE WHEN sex = \'m\' THEN \'f\' ELSE \'m\' END\n\nWhen you need to replace data in rows on some condition you can use WH
# Solution\n```\nUPDATE  salary\nSET  sex = CASE WHEN sex = \'m\' THEN \'f\' ELSE \'m\' END\n```\nWhen you need to replace data in rows on some condition you can use **WHERE**. But when you **UPDATE** all data, you can use condition on **SET**.\nIf you find this **solution** and **explanation** helpful, please **upvote** it for others people.\n
['MySQL']