# change gender from male to female, and from female to male UPDATE salary SET sex = CASE sex WHEN 'm' THEN 'f' ELSE 'm' END; # or update Salary set sex = if(sex='m', 'f', 'm');