I have recently come across a point where I need a database to do the above. I have looked online and have not found something that solves the problem and I understood. Another way to phrase the above question is "how could I make the rows always in integer order moving to replace voids filled by deleted rows?" Any help would be greatly appreciated.
Asked
Active
Viewed 99 times
2
-
3Why this functionality is required, can you give us some detail? – Yaqub Ahmad Feb 15 '12 at 03:46
-
1Explain why you came "across a point where I need a database to do" this. It may help provider betters answers to your question. – Bernard Feb 15 '12 at 03:46
1 Answers
2
One gets a greater understanding of what SQL is and how to use it within a given implementation to avoid considering questions and approaches that are incorrect and likely to lead to error-ridden, excessive, invalid, unmaintainable, results.
You don't change the primary key. You add an order column or use rownum(oracle) or something like that. Leave the rowids / primary key alone.

Michael Durrant
- 93,410
- 97
- 333
- 497
-
Thank you, due to this I created a method to solve this issue. Accepted and an upvote. – jersam515 Feb 18 '12 at 01:16