Drop foreign key only if it exists
I'm doing this, but it doesn't work.
ALTER TABLE `object` DROP FOREIGN KEY IF EXISTS `object_ibfk_1`;
I've tried to put this IF EXISTS wherever I could. How can check if foreign key is exists before drop it?
Subject
Views
Written By
Posted
Drop foreign key only if it exists
29281
July 17, 2008 02:24AM
13776
July 17, 2008 08:21PM
10728
August 12, 2008 06:00AM
19252
February 11, 2009 01:32PM
12923
February 12, 2009 10:47AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.