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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -