PL/SQL – Sathya's World
PL/SQL
PL/SQL Procedure To Reset A Sequence To A Predefined Number in Oracle
· ☕ 2 min read · ✍️ Sathyajith Bhat
Over the period of time that I’ve been working on PL/SQL, the one the thing that we end up doing often is reset the sequences we use for Primary keys in our tables. Why do we do that, you might wonder. Consider this case: You enter some values via the front end. Assume that there are *a lot* of fields to be entered. You save them. The .nextval will pick up the next number in the sequence and goes into your table as the primary key.