मैं का उपयोग कर विदेशी कुंजी के एक नंबर छोड़ने के लिए कोशिश कर रहा हूँ:MySQL ड्रॉप विदेशी कुंजी त्रुटि 152
ALTER TABLE `table` DROP FOREIGN KEY `fk_table_users1` , DROP FOREIGN KEY `fk_table_accounts1` , DROP FOREIGN KEY `fk_table_data1` ;
लेकिन यह त्रुटि देता है:
Error on rename of './db/table' to './db/#sql2-179c-288289' (errno: 152)
मैं SHOW ENGINE INNODB STATUS
चलाने जो कहते हैं:
120725 12:38:37 Error in dropping of a foreign key constraint of table db/table,
in SQL command
ALTER TABLE `table` DROP FOREIGN KEY `fk_table_users1` , DROP FOREIGN KEY `fk_table_accounts1` , DROP FOREIGN KEY `fk_table_data1`
Cannot find a constraint with the given id fk_table_users1.
SHOW CREATE TABLE 'table'
आउटपुट:
CREATE TABLE `table` (
`id` int(11) NOT NULL auto_increment,
`data_id` int(11) NOT NULL,
`account_id` int(11) NOT NULL,
`status` enum('pending','complete') NOT NULL default 'pending',
`created_at` datetime NOT NULL,
`created_by` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `fk_orders_users1` (`created_by`),
KEY `fk_orders_data1` (`data_id`),
KEY `fk_orders_accounts1` (`account_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
हालांकि जब मैं phpmyadmin के माध्यम से संरचना को देखता हूं तो यह उसी नाम के साथ विदेशी कुंजी सूचीबद्ध करता है। क्या मैं विदेशी कुंजी छोड़ने से पहले कुछ और करने की ज़रूरत है?
कृपया '' SHOW CREATE तालिका तालिका 'का आउटपुट पोस्ट करें; ''। – eggyal
@eggyal ने आउटपुट – xylar
के साथ अपनी पोस्ट संपादित की है, मुझे * किसी भी * विदेशी कुंजी बाधाओं को नहीं देखा जाता है ... – eggyal