Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> temporarily stop and then restart autonumbering of primary key field
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