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!

Dropping a foreign key

641006May 28 2008 — edited May 28 2008
I have 2 tables,say test1 and test2
test1 has a column col1 which is the primary key.
test2 has a column col2 which references test1(col1).

I tried dropping the foreign key constraint from test2 table but could'nt do that.
I used:

alter table test2 drop foreign key SYS_C00155513;
this yielded an oracle error

ERROR at line 1:
ORA-00905: missing keyword

While searching on google i came through another method:

alter table test2 DROP FOREIGN KEY(col2) references test1(col1);

but this also yielded the same error.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 25 2008
Added on May 28 2008
8 comments
2,127 views