How to Drop a foreign key constraint which was created along with the table creation??
2 posters
Unix C++ :: UNIX CPP :: RDBMS & ORACLE
Page 1 of 1
How to Drop a foreign key constraint which was created along with the table creation??
I have created a table with a foreign key. tat is i created the foreign key in the "CREATE TABLE" stmt itself. how to drop this foreign key.??
Re: How to Drop a foreign key constraint which was created along with the table creation??
alter table table_name drop constraint FK_constraint_name;
abhisheksingh- Posts : 10
Points : 117
Join date : 2010-03-09
Age : 37
Location : Haldia
Re: How to Drop a foreign key constraint which was created along with the table creation??
and if u dnt know the foreign key name then just insert any row that will violate the constraint then u will get error from
system stating
cannot validate (SCOTT.FK_DEPTID) - parent keys not found
here fk_deptid is the foreign key
n then u can use the said command.
system stating
cannot validate (SCOTT.FK_DEPTID) - parent keys not found
here fk_deptid is the foreign key
n then u can use the said command.
abhisheksingh- Posts : 10
Points : 117
Join date : 2010-03-09
Age : 37
Location : Haldia
Re: How to Drop a foreign key constraint which was created along with the table creation??
yes.. it works. thx.abhisheksingh wrote:and if u dnt know the foreign key name then just insert any row that will violate the constraint then u will get error from
system stating
cannot validate (SCOTT.FK_DEPTID) - parent keys not found
here fk_deptid is the foreign key
n then u can use the said command.
Similar topics
» view with constraint
» Putting constraint in Oracle
» Separate forum for Case Studies Created!!!
» Explanation for create table..
» To remove repeated data from table?
» Putting constraint in Oracle
» Separate forum for Case Studies Created!!!
» Explanation for create table..
» To remove repeated data from table?
Unix C++ :: UNIX CPP :: RDBMS & ORACLE
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum