我想創建表的外鍵,而NetBeans是給我的SQLite exepction - 語法錯誤:SQlite的 - 創建表FK錯誤
AndroidRuntime Caused by: android.database.sqlite.SQLiteException: near "_id": syntax error: CREATE TABLE customer1 _id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, info REAL, customer_a INTEGER, FOREIGN KEY (customer_a) REFERENCES customer4 (_id);
雖然,表customer4在創建表customer1表中存在的時間,我仍然收到語法錯誤。我一直在網上尋找,我還沒有發現任何說明,我有不好的語法。你看到問題在哪裏?
感謝
感謝的話,我應該補充括號,我應該已經合併雙方 「customer_a INTEGER」 和 「外鍵(customer_a)參考文獻customer4(_id)」 到 「customer_a INTEGER參考文獻customer4(_id)」? – Waypoint