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

c++ - Do gcc's __float128 floating point numbers take the current rounding mode into account? -

java - the value of local variable is not used -