If we want to swap the values of m->f and m->f Using the if condition Update Salary Set sex = if(sex ='m','f','m');