我想使用以下内容创建一个表:
def Create_Table():
c.execute("CREATE TABLE Interview_Test_Stat (
Employees VARCHAR(2) CHARACTER SET utf8,
VARCHAR(7) CHARACTER SET utf8,
VARCHAR(6) CHARACTER SET utf8,
VARCHAR(7) CHARACTER SET utf8,
INT,
Bosses VARCHAR(2) CHARACTER SET utf8,
Column_7 VARCHAR(6) CHARACTER SET utf8,
Column_8 VARCHAR(6) CHARACTER SET utf8)"
)
但是当我运行它时,我收到以下错误:
Traceback (most recent call last):
File "<string>", line 301, in runcode
File "<interactive input>", line 1, in <module>
File "C:\Users\Rony\Desktop\Tables.py", line 21, in Create_Table
c.execute("CREATE TABLE Interview_Test_Stat (Employees VARCHAR(2) CHARACTER SET utf16, VARCHAR(7) CHARACTER SET utf16, VARCHAR(6) CHARACTER SET utf16, VARCHAR(7) CHARACTER SET utf16, INT,Bosses VARCHAR(2) CHARACTER SET utf16, Column_7 VARCHAR(6) CHARACTER SET utf16, Column_8 VARCHAR(6) CHARACTER SET utf16)")
sqlite3.OperationalError: near "CHARACTER": syntax error
我不确定我做错了什么。