我正在尝试修复我的java代码中的sql错误。
错误讯息:
[SQLITE_ERROR] SQL错误或缺少数据库(靠近“transaction”:语法错误)
SQL查询:
"CREATE TABLE IF NOT EXISTS transaction(id_transaction INTEGER PRIMARY KEY AUTOINCREMENT, id_client INTEGER, id_product INTEGER, transaction_date DATE NOT NULL,"
+ " FOREIGN KEY(id_client) REFERENCES client(id_client),"
+ " FOREIGN KEY(id_product) REFERENCES product(id_product))";
也许我是盲人但是有逗号,空格,创建了外键列,也引用了表。