Home > database > A great god for help! Existing large amounts of data sorting column (PK_ID) disconnect, how to conti
A great god for help! Existing large amounts of data sorting column (PK_ID) disconnect, how to conti
Time:10-19
CodePudding user response:
Use a sequence, or existing data maximum plus one,
CodePudding user response:
Don't know you is how to generate the PK_ID, even with sequence in oracle, if not to delete data can be any card ID is continuous, but when have data to delete, the sequence will be interrupted, and the deleted ID value, the sequence is not found also won't recycling use, Calculation PK_ID if you are in your application, you can look up to the maximum ID value, then add 1, want to consider when concurrent ID repeat problem, need to lock table lock table affect database performance, Recommend the use of sequence, the sequence of the initial value is equal to the existing maximum + 1, each time from 1-6
CodePudding user response:
Continue to sort of what you say is in accordance with the existing ids, the completion of the missing? It is not possible
CodePudding user response:
Sequence of the initial value is equal to the existing maximum + 1, since every time 1, how do you write this? Would the original data reorder?