在 MariaDB 中的表建立外鍵的時候提示錯誤:
SQL Error (1005): Can't create table
edx
.
TestBankAnswer
(errno: 150 "Foreign key constraint is incorrectly formed")

導緻這樣原因是因為你的表中沒有建立 PK (主鍵)。
你需要在你的表上面建立主鍵後再建立外鍵就可以了。
https://www.ossez.com/t/mariadb-1005/225