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!

insert into table a (select * from table b) - need pk?

626608Aug 18 2008 — edited Sep 4 2008
Hi there.
I'm going to insert into table FINAL (select * from table STAGING) - same structure but in STAGING the ID column has nulls.

Do I need to provide the ID (primary key) for table FINAL or will it get created based on sequence/trigger?

If I were doing this in a loop I'd get the next val from the sequence but on a simple insert, I'm curious.

thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 2 2008
Added on Aug 18 2008
16 comments
8,185 views