If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > MySQL script issue "ALTER IGNORE TABLE"

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-12-10, 18:18
tjones1105 tjones1105 is offline
Registered User
 
Join Date: Dec 2007
Posts: 21
MySQL script issue "ALTER IGNORE TABLE"

Hello,
I'm running MySQL 5.0.88 and I'm trying to create a script to modify my current database and I'm running in to errors when a CONSTRAINT already exists on a table.

Code:
ALTER IGNORE TABLE `Client_INFO` ADD CONSTRAINT `fk_cid_Client_Info` FOREIGN KEY (`cid`) 
REFERENCES `ClientData` (`cid`)  ON DELETE CASCADE;
It was my understanding, from the MySQL 5 docs that the Ignore would just fail silently. But that's not the case, at least not for me.

How can I check for the CONSTRAINT so that my script can continue?

Thanks,
tom
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On