gpt4 book ai didi

sqlite - Sqlite 管理器中的语法错误

转载 作者:行者123 更新时间:2023-12-03 15:58:25 25 4
gpt4 key购买 nike

您好,我正在使用以下代码在 sqlite manager 上生成表格。

CREATE TABLE Transaction (ID PRIMARY KEY , amount REAL , currencyCode CHAR(3) , comments VARCHAR , debitAccount INTEGER , creditAccount INTEGER , debitAccountExchangeRate REAL , creditAccountExchangeRate REAL , FOREIGN KEY (currencyCode)REFERENCES Currency (code) , FOREIGN KEY (debitAccount) REFERENCES Account  (ID) , FOREIGN KEY (parentAccount) REFERENCES Account (ID ));

但我收到语法错误。谁能在这里说明我做错了什么。

    [ near "Transaction": syntax error ]
Exception Name: NS_ERROR_FAILURE
Exception Message: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [mozIStorageConnection.createStatement]

最佳答案

试试这个..

CREATE TABLE "Transaction" (ID PRIMARY KEY , amount REAL , currencyCode CHAR(3) , comments VARCHAR , debitAccount INTEGER , creditAccount INTEGER , debitAccountExchangeRate REAL , creditAccountExchangeRate REAL , FOREIGN KEY (currencyCode)REFERENCES Currency (code) , FOREIGN KEY (debitAccount) REFERENCES Account  (ID) , FOREIGN KEY (creditAccount) REFERENCES Account (ID ));

关于sqlite - Sqlite 管理器中的语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7116618/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com