File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
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.

 
wood burning stoves
 
subject: How to delete foreign key without name in Oracle