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

ruby - How do I merge two hashes into a hash of arrays? -

java - the value of local variable is not used -