Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Auto sequencing
Hi
I am writing a C++ application that copies data from an old database and
inserts it into a new Oracle database. Let's say I am transferring a User
table which has a unique identifier called UserID.
I am wondering how Oracle 7/8 handles the autosequencing for UserID in this case. I want to preserve and copy the UserID from the old DB because there are other tables that link to the User table via this ID.
Must I turn Autosequencing off on the new User table, so that I can insert the UserID as a primary key? And if so, how? Once I have inserted the rows from the old table into the new one, I then need to be able to insert new users as normal, with the primary key (UserID) being generated automatically. Will it start from 1, or is there a way that I can tell it to start from max(UserID)+1?
Help is appreciated.
Shaun
Received on Tue Apr 18 2000 - 00:00:00 CDT
![]() |
![]() |