Answer the question
In order to leave comments, you need to log in
Why is there an error with AUTOINCREMENT?
I want to create a table where the id column will fill itself but gives an error. Here is the code:
curr.execute(
f"CREATE TABLE orders (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, class text,)
Answer the question
In order to leave comments, you need to log in
In postgresql you need to write
CREATE TABLE orders (
id serial primary key,
class text);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question