I
I
Ivan Koryakin2021-06-09 12:15:27
Python
Ivan Koryakin, 2021-06-09 12:15:27

Request error?

conn = sqlite3.connect('db.sqlite3')
cursor = conn.cursor()
cursor.execute(f"""CREATE TABLE {i['id_shop']}_{i['name']}(ID int NOT NULL AUTO_INCREMENT, date varchar(25) NOT NULL, title varchar(140) NOT NULL, d varchar(255) NOT NULL, n varchar(255) NOT NULL, k varchar(255) NOT NULL, ocenka varchar(25) NOT NULL, real1 varchar(25) NOT NULL, sku_id varchar(25) NOT NULL,  PRIMARY KEY (ID))""")


Error: sqlite3.OperationalError: near "AUTO_INCREMENT": syntax error

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Shitskov, 2021-06-09
@Zarom

AUTOINCREMENT and not AUTO_INCREMENT

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question