jjzjj

CustomAccountID

全部标签

mysql - MySQL 中的外键添加失败,错误代码为 1005,编号为 150

所以我正在尝试向我的一个表中添加一个新的外键:ALTERTABLE`UserTransactions`.`ExpenseBackTransactions`ADDCONSTRAINT`FK_EBTx_CustomAccountID`FOREIGNKEY(`CustomAccountID`)REFERENCES`UserTransactions`.`CustomAccounts`(`CustomAccountID`)ONDELETENOACTIONONUPDATENOACTION,ADDINDEX`FK_EBTx_CustomAccountID`(`CustomAccountID`ASC)

mysql - MySQL 中的外键添加失败,错误代码为 1005,编号为 150

所以我正在尝试向我的一个表中添加一个新的外键:ALTERTABLE`UserTransactions`.`ExpenseBackTransactions`ADDCONSTRAINT`FK_EBTx_CustomAccountID`FOREIGNKEY(`CustomAccountID`)REFERENCES`UserTransactions`.`CustomAccounts`(`CustomAccountID`)ONDELETENOACTIONONUPDATENOACTION,ADDINDEX`FK_EBTx_CustomAccountID`(`CustomAccountID`ASC)