If you recreate a dropped table, it must have a definition that conforms to the foreign key constraints that reference it. It must have the correct column names and types, and there must be an index on the referenced key, as mentioned earlier. 如果这些不满足,MySQL返回错误1005并引用错误消息中的错误150,这意味着外键约束没有正确形成。 Similarly, if ALTER TABLE fails with error 150, it means that the foreign key definition will not be formed correctly for the changed table.
If you recreate a dropped table, it must have a definition that conforms to the foreign key constraints that reference it. It must have the correct column names and types, and there must be an index on the referenced key, as mentioned earlier.
如果这些不满足,MySQL返回错误1005并引用错误消息中的错误150,这意味着外键约束没有正确形成。
Similarly, if ALTER TABLE fails with error 150, it means that the foreign key definition will not be formed correctly for the changed table.http://stackoverflow.com/ques...