Updating a sequence
This results in a "gap" in the assigned sequence values.When the system comes back up, Oracle will cache new numbers from where it left off in the sequence, ignoring the so called "lost" sequence values.That is, if your sequence is at 500, you can set it to 100 via Just a note for people in PLSQL.Be sure to add "limit 1;" or "rownum =1" to the select statement otherwise you can end up running next Val a couple of times and incrementing by -400 however many times..And it would cause duplicate id errors eventually I suppose, if I hadn't renumbered the ids.Additionally, order by Just resetting the sequence and updating all rows may cause duplicate id errors. First with higher ids to avoid the duplicates, then with the ids you actually want.'.
The real question: why on earth would you want to do that?
Search for updating a sequence:
The correct increment value to use can be obtained from the user_sequences view. However, if you want to set it to 0, you can just delete and recreate it.