Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Script to initialize a sequence number from within a stored procedure

905032Feb 10 2012 — edited Feb 10 2012
Hello,

I am looking for a stored procedure that would initialize an oracle sequence number. I have an existing oracle sequence, my_seq. The my_seq.nextval is at 401. I am looking for a stored procedure that would take in a given number, my_num and make the my_num the starting point number of the my_seq. For example, if my_num is 799 then the my_seq.nextval should be 799. Basically, what I need is a stored procedure to take in a parameter my_num and use my_num to change the my_seq starting number from 401 to my_num. Thank you in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 9 2012
Added on Feb 10 2012
11 comments
3,919 views