Just for testing purpose, so I can apply it to my project.
I have a table, Table1 with IDTable1.
The column is varchar(3) and primary key, not Autonumeric.(Cannot duplicate)
(I have to deal with varchar, can't change it to integer, the company is already using it long time ago.)
The point is that I have straight random numbers with one "gap or space" between a number and another, in this case number "11".
I need to re-order these numbers as a result like this:
How can I do that. I know this query doesn't work at all, but I hope you get the idea.
I read about creating a temporary table but don't know if its necessary.
SET IDTable1 = IDTable1 - 1
WHERE IDTable1 > 9
Note: the IDTable1 less than "9" its not necessary.
Because I'm using 01,02,03,04,05,06,07,08,09.
I don't want to complicate this problem, so > "10" is ok.
I hope I explained enough. Thanks!