I am creating two tables each having one primary key column and another column that is used to link both tables using a foreign key.
create table t1(a number not null primary key,
b number);
create table t2 ( c number ,
d number not null primary key);
alter table t1 add foreign key (b) references t2(d);
alter table t2 add foreign key (c) references t1(a);
Now when I try to insert values in any one of the table I get the error as below
ORA-02291: integrity constraint (SQL_KVQVOPFDDGLIGJGJSPOQZZIPN.SYS_C0049615414) violated - parent key not found ORA-06512: at "SYS.DBMS_SQL", line 1721
How can I insert the data on both columns of table t1 at once?