✅ Using UPDATE and IF | MySQL | Very Easy
How IF works?\nIF (condition, truthyValue, falsyValue). If condition is true, truthyValue is returned, otherwise falsyValue is returned.\n\n\nUPDATE Salary\nSET
**How IF works?**\nIF (condition, truthyValue, falsyValue). If condition is true, truthyValue is returned, otherwise falsyValue is returned.\n\n```\nUPDATE Salary\nSET sex = IF(sex = \'m\', \'f\', \'m\');\n```\n\n**IF FOUND USEFUL, PLEASE UPVOTE**
['MySQL']