auto increment issue | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

auto increment issue

hi,could someone please explain why this table creation would show an error because of the auto_increment constraint? or how to fix it. https://code.sololearn.com/cUgD316ktFhP PS: i only saved the code in the python environment(form link) because the site doesn't allow me to directly write the SQL code hear.

14th Apr 2022, 8:15 PM
KANYISA
2 Answers
+ 1
You're probably using a SQL flavor that doesn't use auto_increment. (SL uses PostgreSQL.) https://www.w3schools.com/SQl/sql_autoincrement.asp https://www.educba.com/postgresql-auto-increment/
14th Apr 2022, 8:33 PM
Simon Sauter
Simon Sauter - avatar
+ 1
That was very helpful thanks.
15th Apr 2022, 1:45 PM
KANYISA