Page 1 of 1

re ordering auto increment

Posted: Tue Nov 15, 2005 3:07 pm
by kendall
Hey,

I have a table that has an auto_incremented column (not primary) which acts as a sort value for the information.

I want to know if i can "RE ORDER" the values of the column based on an update

e.g.
if row 4 is 3 and row 7 is 7 and i update row 7's sort vaule to 3 it should re order the row values from row for go down
can this be accomplished

Kendall

Posted: Tue Nov 15, 2005 3:14 pm
by foobar
I'm not positive, but I think this is impossible.

Try running a query similar to the following one:

Code: Select all

UPDATE thetable SET thecolumn = 3 WHERE thecolumn = 7

Posted: Wed Nov 16, 2005 7:16 pm
by lostboy
I use something similar but its easier to handle as a non autoincrement value...i control it from the application