Mysql错误问题:ERROR 1005 (HY000): Can't create table 'crm_1.tbl_client' (errno: 150)
生活随笔
收集整理的這篇文章主要介紹了
Mysql错误问题:ERROR 1005 (HY000): Can't create table 'crm_1.tbl_client' (errno: 150)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
MySQL外鍵創建條件:
1.兩個表必須是InnoDB數據引擎
2.外鍵表的外鍵字段必須是主鍵
3.字段類型必須一致
創建表時創建外鍵:
?create table tbl_client(userName varchar(255) not null, address varchar(255), createDate timestamp not null default now(), createUserName varchar(255), foreign key(createUserName) references tbl_user(userName));
轉載于:https://www.cnblogs.com/djoker/p/6685583.html
總結
以上是生活随笔為你收集整理的Mysql错误问题:ERROR 1005 (HY000): Can't create table 'crm_1.tbl_client' (errno: 150)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: [4.9福建四校联考]
- 下一篇: jQuery 常用的效果函数(一)