4 Acceptable Solutions
Updating using IF \nUPDATE Salary SET sex = IF(sex = \'m\', \'f\', \'m\');\n\n#Updating using CASE WHEN\nUPDATE salary SET sex = (\nCASE WHEN sex = \'m\' THEN  
#Updating using IF \nUPDATE Salary SET sex = IF(sex = \'m\', \'f\', \'m\');\n\n#Updating using CASE WHEN\nUPDATE salary SET sex = (\nCASE WHEN sex = \'m\' THEN  \'f\' \nELSE \'m\' \nEND\n);\n        \n#Updating using REPLACE function        \nUPDATE salary SET sex = REPLACE (\'fm\', sex, \'\');\n\n#Updating using XOR operator\nUPDATE salary SET sex = CHAR(ASCII(\'f\') ^ ASCII(\'m\') ^ ASCII(sex));
['MySQL']