Easy solution
Syntax of Update: update table_name set row_name value we can also write condition where condition\nwe can use the bellow query but if we only need to update \'
**Syntax of Update:**   ``update table_name set row_name value `` we can also write condition ``where condition``\nwe can use the bellow query but if we only need to update \'f\' to \'m\'.\n```\nupdate Salary set sex = \'f\' where sex = \'m\'\n```\nIn this question we need to update \'f\' to \'m\' and \'m\' to \'f\' so we will use case statement.\n```\nUPDATE Salary SET sex = (\n    CASE sex\n    WHEN \'f\' THEN \'m\'\n    ELSE \'f\'\n    END\n);\n```\n**PLEASE UPVOTE**
['MySQL']