无法明确的sqlite语法错误
我正在尝试创建数据库的语句,并且在10个实体之后,我遇到了这个错误
错误:第83行:近“交易”:语法错误
第一行是第83行,其上下文是创建表的上下文
CREATE TABLE Transaction (
TransactionID INTEGER,
AccountID INTEGER REFERENCES User (AccountID),
ItemID INTEGER REFERENCES Item (ItemID),
Method STRING,
Price INTEGER,
TransactionDate DATE,
PRIMARY KEY (TransactionID)
);
,我似乎找不到问题,并且使用错误的空间无法使用ASCII的建议。通过再次手动编写同一件事来解决。
我什至还没有检查外国钥匙的完整性,而且它没有起作用。希望有人可以对我缺少的东西提供一些见解。
I'm trying out statements for creating a database, and after 10 entities without any issues I ran into this error
Error: Near line 83: near "Transaction": syntax error
The first line is line 83 with it's context of creating a table
CREATE TABLE Transaction (
TransactionID INTEGER,
AccountID INTEGER REFERENCES User (AccountID),
ItemID INTEGER REFERENCES Item (ItemID),
Method STRING,
Price INTEGER,
TransactionDate DATE,
PRIMARY KEY (TransactionID)
);
Now I can't seem to find the issue, and suggestion's of something with ASCII using the wrong space couldn't be solved by writing the same thing again manually.
I haven't even gotten around to checking the integrity of my foreign keys, and it's not working. Hopefully somebody could provide some insight on what I'm missing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事务
是SQLite中的保留名称之一。有关完整列表,请参见在这里。解决此问题的方法是:
或
Transaction
is one of the reserved names in SQLite. For a full list see here.Ways to solve this issue are:
or