LMSouq
general-dev Open

automatically insert auto increment primary key and values into existing table

FL
FlyingCat
1 month ago
3 views
Problem Description
I am trying to alter a table which has no primary key nor auto_increment column. I know how to add an auto increment primary key column. I already have 500 rows in the DB and want to give them ids but I don't want to do it manually. How do I insert data into the primary key column automatically?

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base