Sep-14-2017, 10:07 PM
Hi. I want to set my id auto increment in sqlite3 in python 3.6
When i run my code i get this error:
When i run my code i get this error:
Error:sqlite3.OperationalError: near "AUTOINCREMENT": syntax error
And my code is:import sqlite3 as sq conn = sq.connect("shut.db") cur = conn.cursor() cur.execute(''' CREATE TABLE Shut (ID INT PRIMARY KEY NOT NULL AUTOINCREMENT, NAME TEXT NOT NULL); ''')What is my problem?