MySQL Forums
Forum List  »  PHP

Re: swap rows in database
Posted by: Peter Brawley
Date: May 23, 2016 04:22AM

To 'swap' rows with ordering column values a and b, write a transaction that updates a to x, b to a, then x to b. The transaction needs three update statements.

Options: ReplyQuote


Subject
Written By
Posted
May 23, 2016 01:10AM
Re: swap rows in database
May 23, 2016 04:22AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.