Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> temporarily stop and then restart autonumbering of primary key field

temporarily stop and then restart autonumbering of primary key field

From: brightspot <brightspot5_at_hotmail.com>
Date: 17 Aug 2005 07:11:51 -0700
Message-ID: <1124287911.287267.40190@g47g2000cwa.googlegroups.com>


Good Morning,

I know this is dangerous and I will take appropriate safety precautions.

This is what I'm trying to do and I wonder if it is possible to do it in Oracle as it is in SQL Server.

My table has a primary key field with the values 1 through 5 in it. I want to suspend autonumbering, set the next value to 38, resume autonumbering and have Oracle continue on with value 39. The column would look like this:
1
2
3
4
5
38
39
40
...

Is this possible using PL/SQL from a stored procedure?

Thanks,
Chris Received on Wed Aug 17 2005 - 09:11:51 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US