mysql - How to add primary key in SQL? -


this question has answer here:

i created table(let's contact info), forgot create primary key. since entered values in table want keep table , want add primary key column. how add primary key column on left side of table incremental numbers?

you can add auto-incrementing column:

alter table contact_info add column id int primary key auto_increment; 

Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -