Re: Deleting Foreign Key

2007-01-04 Thread Mungbeans
Chris White-4 wrote: > > Moving along... what I do first is SHOW > CREATE TABLE `table_name`: > ...snipped... > So, first you remove the key: > ALTER TABLE table_name DROP KEY `key_column`; > then the foreign key: > ALTER TABLE table_name DROP FOREIGN KEY `table_name_ibfk_1`; > ...snipped...

Re: Deleting Foreign Key

2007-01-04 Thread Chris White
Mungbeans wrote: ALTER TABLE `mytable` DROP FOREIGN KEY `keyname` #1025 - Error on rename of '.\database\mytable' to '.\database\#sql2-6ec-11' (errno: 152) ALTER TABLE `mytable` DROP INDEX `keyname` #1025 - Error on rename of '.\database\#sql-6ec_13' to '.\database\mytable' (errno: 150 Oh t

Re: Deleting Foreign Key

2007-01-04 Thread Heikki Tuuri
Mungbeans, I do not understand how you get error 152 from the ALTER. ./include/my_base.h:355:#define HA_ERR_ROW_IS_REFERENCED 152 Please print SHOW INNODB STATUS\G after you get that error. Best regards, Heikki Oracle Corp./Innobase Oy InnoDB - transactions, row level locking, and foreign key