MYSQL, 95% fast, 100% memory
If you found the solution helpful, kindly upvote. :)\n\n\nUPDATE salary \nSET \n    sex= CASE sex\n        WHEN \'m\' THEN \'f\'\n        ELSE \'m\'\n    END;\n
If you found the solution helpful, kindly upvote. :)\n\n```\nUPDATE salary \nSET \n    sex= CASE sex\n        WHEN \'m\' THEN \'f\'\n        ELSE \'m\'\n    END;\n```
[]