Second one, suppose field1='a' & field2='b', i want to set field1='b' & field2='a'. & i cant add a third field for keeping value of one of them.
& some records values must change, so i cant rename column name.
in some programming language we have a function for change values of 2 variables, without making third variable, i just want to know is there such a function in mySQL?
The problem can even be solved with a single variable
1) declare your variable
2) assign the value of Field1 to the variable
3a) update Field1 with value from Field2
3b) update Field2 with value in our variable