Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLite使用时报错,SQL logic error: near "=": syntax error (1) #2

Open
lexno opened this issue Oct 14, 2024 · 0 comments
Open

Comments

@lexno
Copy link

lexno commented Oct 14, 2024

如果使用SQLite时,会执行SQL:
CREATE TABLE IF NOT EXISTS %s ( ptype VARCHAR(10) NOT NULL DEFAULT '', v0 VARCHAR(256) NOT NULL DEFAULT '', v1 VARCHAR(256) NOT NULL DEFAULT '', v2 VARCHAR(256) NOT NULL DEFAULT '', v3 VARCHAR(256) NOT NULL DEFAULT '', v4 VARCHAR(256) NOT NULL DEFAULT '', v5 VARCHAR(256) NOT NULL DEFAULT '' ) COMMENT = 'policy table';
但是SQLite不支持COMMENT 指令,导致执行此条SQL时报错:
SQL logic error: near "=": syntax error (1)

解决方案,将COMMENT = 'policy table'删除。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant