innodb - Foreign Key Input error in Link table (Error 1005) -


i trying input foreign keys link table @ once. created other tables first link table, added columns link table foreign keys (that worked). went insert foreign keys , doesn't work (by way none of other tables have foreign keys)

it says

#1005 - can't create table 'waget.#sql-798_842' (errno: 150) (details...)  

i clicked on details , comes innodb [ variables | buffer pool | innodb status ] click on variables has question mark next 3 things autoextend increment,buffer pool size,data home directory

im lost want able create foreign keys please foreign key insert code

use dbase; alter table link add foreign key (c_id) references c (c_id), add foreign key (d_id) references d (d_id), add foreign key (t_id) references t (t_id), add foreign key (b_id) references b (b_id), add foreign key (h_id) references h (h_id); 

make sure both collumns same: both int or varchar etc., both same length, both null or not.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -