MySQL Forums
Forum List  »  Newbie

Swap IDs between two rows
Posted by: Dimitris Sehh
Date: September 20, 2006 07:12AM


i've got a table which uses the first column as an identification number:


its possible to swap them from the application level, but i'd like to know there is a faster way to do this within mysql directly.

i'd like to swap two rows by swapping their ID's. What is the proper and optimal way to swap the IDs of two rows?

Thank you.

Options: ReplyQuote

Written By
Swap IDs between two rows
September 20, 2006 07:12AM
September 20, 2006 07:21AM
September 22, 2006 12:49AM
September 22, 2006 06:05AM
October 16, 2007 04:38PM
October 03, 2008 07:15PM

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.