Home > database >  Oracle ID since growth is more and more big, you want to start from 1 to arrange how to do?
Oracle ID since growth is more and more big, you want to start from 1 to arrange how to do?

Time:09-23

Created sequence and the trigger, after joining data, id into hundreds of, how to let him start from 1 order?

CodePudding user response:

You can directly modify the sequence, starting at 1 plus 1 at a time

CodePudding user response:

Two methods:
1, remove after reconstruction of the sequence, compile the trigger;
2, assume that the value is 1000 now, but you just put the sequence set to - 999, the growth of nextval under manual query again, the increment is set to 1 can again, don't need to compile the trigger,

CodePudding user response:

The fastest to rebuild the sequence with the same name, don't bother

CodePudding user response:

Since the ID to start, do not duplicate? Can be repeated? To millions of value, is not big,

CodePudding user response:

Modify the sequence, the sequence before nocycle, into a cycle

CodePudding user response:

The sequence generator is deleted, to create a,
  • Related