Skip to Main Content

Oracle Database Express Edition (XE)

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!

Insertion of Data with foreign key constraint

User_STYEHSep 7 2021

Any constraint if violated during the bulk insertion, will insert records satisfying the constrants or abort the complete insertion.
Example: I have 100 rows and I wrote an insert statement with select.
insert into table_2(col1, col2, col3) select * from table1;
say suppose col1 having a foreign key constraint, a row smewhere in the middle is not satisfying this constraint, so will my insert query be

  1. inserting all other records,
  2. or records coming previous to the record having problem,
  3. or no records will be inserted

Comments

Post Details

Added on Sep 7 2021
2 comments
239 views