| Reorder ID column [message #1341] |
Wed, 30 May 2007 18:44  |
GeoffreyF67 Messages: 21 Registered: May 2007 |
Junior Member |
|
|
Anyone know of an easy way to reorder an PRIMARY auto increment column that has lots of holes in it?
G-Man
G-Man
|
|
|
|
| Re: Reorder ID column [message #1351 is a reply to message #1341 ] |
Fri, 01 June 2007 05:38   |
Speeple Messages: 91 Registered: August 2006 |
Member |
|
|
Agree with the above post, and if you reordered a relational table setup the relation ships would have to reflect the changes.
If there are no relationships to be lost, then you could just CREATE TABLE LIKE... called table_new
Then do INSERT INTO table_new (id, column1 ...) SELECT null, column1 ... FROM table_old;
Martin Gallagher | Speeple: The latest news
|
|
|
|