How can I use auto increment value in primary key in the existing table? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How can I use auto increment value in primary key in the existing table?

SQL

28th Oct 2019, 6:30 AM
Monim
Monim - avatar
2 Answers
+ 2
Thanks Xyenia.
28th Oct 2019, 5:53 PM
Monim
Monim - avatar
+ 1
Take a look at the sql syntax here: https://www.w3schools.com/sql/sql_autoincrement.asp Also, if you are using phpMyAdmin, through the interface, you can select auto increment for the primary key field. I think 🤔 the field type has to be numerical for AI (auto increment)
28th Oct 2019, 7:52 AM
Xyenia 🦉
Xyenia 🦉 - avatar