'How do I add an Automatic ID to this Python Database?
I made this database, but I dont understand why the id part doesnt work.
As an response I get this:
[(None, 'Wilhelm der Erste', 1027, '09.09.1087', '1066-1087', 'W087'),
(None, 'Wilhelm der Zweite', 1056, '02.08.1100', '1087-1100', 'W100'),
(None, 'Heinrich der Erste', 1068, '01.12.1135', '1100-1135', 'H135')]
THIS is my Code
sql_anweisung = '''CREATE TABLE IF NOT EXISTS "liste" (
"id" PRIMARY KEY AUTOINCREMENT,
"name" VARCHAR(30),
"geburt" INTEGER,
"gestorben" TEXT,
"krönung" TEXT,
"kürzel" TEXT
);'''
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|