New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
http://stackoverflow.com/questions/3279072/strip-all-spaces-from-column-in-mysql ?
Is the actual data 'ID1' .. etc...? Or is the data '1'?
No that's totally different.
I mean I want them to be 1,2,3,4,5...instead of 1,2,5,8..etc..
I mean id of the table. id=1, id=2, etc..
What is the problem you are trying to solve?
It's probably not a good idea, particularly if the ID is associated with other tables.
Nonetheless
SET @inc = 0;
UPDATE select_table SET id = @inc := @inc + 1 ORDER BY id ASC;
http://stackoverflow.com/questions/7377628/how-to-reorder-a-primary-key
I see no point in doing that, though.