原文:mysql執行帶外鍵的sql文件時出現mysql ERROR 1215 (HY000): Cannot add foreign key constraint的解決

ERROR HY : Cannot add foreign key constraint 最近在建表時遇到了這個錯誤,然后找了下找到了解決辦法,記錄下: 本來是要建兩張表: create table department id int , name varchar create table employee id int primary key auto increment, name varc ...

2018-04-14 11:15 0 7821 推薦指數:

查看詳情

MySql添加報錯:Cannot add foreign key constraint

設計的界面有七列:1、名(name):可以不填,保存時會自動生成。2、欄位(FieldName):要設置的3、參考數據庫(Reference DataBase):關聯的數據庫4、被參考表(Reference Table):關聯的表5、參考欄位(Forgin filed Names ...

Thu Jan 17 17:49:00 CST 2019 0 2856
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM