I have a user table in my mysql database with columns like id, age and gender. I included about 500 entries in it.
Now I need to change the gender for the records, i.e. replace a man with female and female men.
I thought of doing it like this:
update users set gender='female' where gender='male'; update users set gender='male' where gender='female';
But, as you can see, as soon as I launched the first request, all entries will be updated if the gender is set to "female".
How can I change the request or should I go the other way?
source share