X := X XOR Y
Y := X XOR Y
X := X XOR Y
This allows you to swap two columns in a table if you can't alter the table to add a column temporarily to swap them. I'm not sure how mysql handles user variables in update statements.
Python, MySQL and Your Mom
No comments:
Post a Comment