|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Error 1005 when adding a Foreign Key
From: Bartis, Robert M (Bob) (bartis
lucent.com)
Date: Fri Jul 02 2004 - 14:12:09 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I recently added a column and Index to an existing table. I wanted to also add a Foreign Key. I have done this before defining the commands outside MySQL and souring the file in for new tables, but would prefer to not have to dump the current table just for the modification. I tried to add one based on the users guide, see command/response below, without success. Obviously I am missing something. Any suggestions?
mysql> alter table runload_list add foreign key (PlanName) references testplans (PlanName) on update cascade on delete restrict;
ERROR 1005: Can't create table './mydb/#sql-3ebd_430.frm' (errno: 150)
Robert M. Bartis
Lucent Technologies ¢
Room HO 1C-413A (HO) / 1B-304 (WH)
( 732.949.4565 (HO) / 973.386.7426 (WH)
* bartis
lucent.com
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]