思路1

UPDATE salary
SET sex=IF(sex="f", "m", "f");

Last updated