How to add auto-increment in an Existing tables in MYSQL database?

 Posted by vishalneeraj-24503 on 3/6/2014 | Category: Sql Server Interview questions | Views: 1786 | Points: 40

alter table table_name modify column_name data-type(length) auto_increment primary key;

For Example:-
alter table Employee_Master modify Employee_Id int(5) auto_increment primary key;

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response