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!

auto increment column restart

mlov83Aug 23 2013 — edited Aug 23 2013

I have been looking for a way to auto increment a column when I have found the solution here.
Creating BETTER auto-increment columns in Oracle all the solutions that I have found thus far use a sequence. However when I delete the table and start over the sequence obviously restarts at the last number that is used before.

So in other words if I insert 5 records into the table I get sequence 1-5 , great! then I delete the table and would like to restart from 1 again. obviously because of the method im using the sequence has been updated so I get the next available number.

How can I do an auto increment that always starts from 1 in a table is there a solid solution out here?

with MySQL is a simple table column setting.

Thanks in advance for any help you guys can offer.

Miguel

This post has been answered by mlov83 on Aug 23 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 20 2013
Added on Aug 23 2013
12 comments
2,966 views