|
-
-------------------------------
Then I would delete all these rows and populate 1 row of data into ANOTHER DIFFERENT table.
I still use value 'ID.NextVal' when inserting the data.
My ID column on this other table should read :
ID
----
1
but, it reads :
ID
----
5
-------------------------------
If your intension is to use the same id number both for the same table then you should not use the sequence ID.NextVal anymore. As what jmodic says sequence is totally independent from other objects, so the current value of the sequence is the last value acquired after you issue the nextval.
Your option is to use that ID sequence both for two tables before nextval is issued:
insert into my_table(c1) values(ID.NEXTVAL);
insert into table2(c1) values(ID.CURRVAL);
commit;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|