我创建了下表:
sql_command = """CREATE TABLE users (
id VARCHAR(255) PRIMARY KEY,
name VARCHAR(255),
company VARCHAR(255));"""
当我运行以下命令时:
sql = """INSERT INTO users(id, name, company) VALUES (%s, %s, %s)"""
crsr.execute(sql, ("value", "value", "value"))
我收到错误消息:
File "test.py", line 50, in analyzeUsers
crsr.execute(sql, ("value", "value", "value"))
sqlite3.OperationalError: near "%": syntax error
任何想法?