0
当我尝试向列中添加外键时出现错误。请让我知道它有什么问题。无法更改表来设置外键
ALTER TABLE address
ADD CONSTRAINT FK_employeeid
FOREIGN KEY (employeeid) REFERENCES newdb(employeeid);
错误:
1005 - Can't create table
mydb
.#sql-1cc_564
(errno: 150 "Foreign key constraint is incorrectly formed")
我们可以看到你的'CREATE TABLE'语句吗? –
我从phpMyadmin创建它 – Prakash
你真的有_table_叫做_newdb_吗? – jarlh