I hope I can explain this. I have a table which contains a field named ID. This is set as PRIMARY. Because users registered on my site and after that deleted their accounts (so a lot of rows got deleted, too) the table rows now are jumping, for example, from ID 33 to 3333.
What I want to do is to rewrite, somehow, the ID field, so the rows will start from 1 and end at the last row. Is there a way to do this?
Thanks!
RobotFX
0
Junior Poster in Training
Recommended Answers
Jump to Postthe table rows now are jumping
I really do not understand what exactly you mean by that, are you trying to re arrange the ids starting from 1 and increment by 1 till the last record ?
Jump to PostI want to understand what is the problem if the id values are not continuous. As you said this field is the PK of the table, is it not referred by any other table ?
All 7 Replies
debasisdas
580
Posting Genius
Featured Poster
RobotFX
0
Junior Poster in Training
debasisdas
580
Posting Genius
Featured Poster
RobotFX
0
Junior Poster in Training
debasisdas
580
Posting Genius
Featured Poster
RobotFX
0
Junior Poster in Training
debasisdas
580
Posting Genius
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.