sql - MySQL errno 150 without solution yet -


However this is a repeated question, but I am searching through many similar posts, but nothing is useful Found. Here is my SQL script for MySQL.

  The database does not exist if the store does not exist; Use shop; The creation of the table does not exist, the box (coord VARCHAR (255), box_id INT is not unsigned NULL, img_path VARCHAR (256), primary key (coord, box_id)); Toolbase (tool_id), foreign key (tool_id box_id) reference box (box_id) is not present if the table is not present, then the device (serial VARCHAR (50), INT, descr VARCHAR (256), box_id INT unsigned NULL, tool_state boolean, primary key (tool_id) );  

Output is: Error 1005 (HY000) on line 9: The table can not be created 'store.Tool' (errno: 150) Any suggestions

< P>

from:

You had to delete a table again, making it a definition that Foreign key refers to obstacles that should be consistent. It should have the correct column names and types, and it should be indexed on the referenced key, as mentioned earlier, these are not satisfied, MySQL returns error number 1005 and refers to error 150 in error message.

I think that you use the same amount of foreign key in your code, you use 2 tablets in the table box, so either you only box_id your PK form Use or add foreign keys to the table tool.


Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -