mysql replace values in a table
update users set gender=case when gender='male' then 'female' else 'male' end where gender in ('male','female');
UPDATE users SET gender='tmp' WHERE gender='male';
UPDATE users SET gender='male' WHERE gender='female';
UPDATE users SET gender='female' WHERE gender='tmp';
Combine two queries into one :-
update users set gender = if (gender='female', 'male', 'female');