mysql - How to add primary key in SQL? -
this question has answer here:
- how add primary key mysql table? 8 answers
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
Post a Comment