aspose file tools*
The moose likes JDBC and the fly likes How to delete foreign key without name in Oracle Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to delete foreign key without name in Oracle" Watch "How to delete foreign key without name in Oracle" New topic
Author

How to delete foreign key without name in Oracle

RabiDas Sharma
Ranch Hand

Joined: Nov 18, 2013
Posts: 69
Hi everyone,
I forgot to give name of foreign key constraint.
i.e,
I added Foreign key constraint in the following way:

ALTER TABLE Result1
ADD foreign key (stud_id) references Student(stud_id);

How I can drop the above foreign key constraint...???


thanks
with regards
Heena Agarwal
Ranch Hand

Joined: Dec 25, 2013
Posts: 261
    
    4
Query the user_constraints table to get the constraint_name.

Then run an alter table query that will drop that constraint.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to delete foreign key without name in Oracle