Simple and Clean!
IF (MySQL):\n\nUPDATE salary SET sex = IF(sex = \'m\', \'f\', \'m\')\n\n\nIIF (MS SQL):\n\nUPDATE salary SET sex = IIF(sex = \'m\', \'f\', \'m\')\n\n\nCASE WHEN
**IF (MySQL)**:\n```\nUPDATE salary SET sex = IF(sex = \'m\', \'f\', \'m\')\n```\n\n**IIF (MS SQL)**:\n```\nUPDATE salary SET sex = IIF(sex = \'m\', \'f\', \'m\')\n```\n\n**CASE WHEN (MySQL + MS SQL + Oracle)**:\n```\nUPDATE salary SET sex = CASE WHEN sex = \'m\' THEN \'f\' ELSE \'m\' END\n```
['MySQL', 'Oracle', 'MS SQL Server']