Short and Simple Solution using case
<<<<<<<<<<<<< UPVOTE IF YOU LIKE IT\n\n# Write your MySQL query statement below\nUPDATE Salary \nSET sex=\n(case \n   when sex=\'f\' Then \'m\'\n\telse \'f\'\ne
**<<<<<<<<<<<<< UPVOTE IF YOU LIKE IT**\n```\n# Write your MySQL query statement below\nUPDATE Salary \nSET sex=\n(case \n   when sex=\'f\' Then \'m\'\n\telse \'f\'\nend);\n```
['MySQL']