0
我使用Mysql命令行創建了幾個簡單的表。在創建我的外鍵時,我獲得了錯誤號150的股票。你能幫我解決這個問題嗎?我對SQL很陌生。 謝謝!Mysql:無法創建表errno 150
mysql> CREATE TABLE maintenancepersons (ServiceID INT NOT NULL AUTO_INCREMENT,
MechanicID INT NOT NULL,
ServiceName VARCHAR(100) NOT NULL,
PRIMARY KEY (ServiceID), CarVIN INT NOT NULL,
FOREIGN KEY (CarVIN) REFERENCES cars ,
CustomerID INT NOT NULL, FOREIGN KEY (CustomerID) REFERENCES customers);
ERROR 1005 (HY000): Can't create table 'dealership.maintenancepersons' (errno: 150)
可能重複的[Mysql。無法創建表errno 150](http://stackoverflow.com/questions/1749332/mysql-cant-create-table-errno-150) – Phil
此鏈接可能會幫助您的問題http://stackoverflow.com/問題/ 825362/mysql-error-150-foreign-keys – Sadikhasan