add primary key with auto increment to existing table column mysql
addprimarykeywith auto increment to existing tablecolumnin mysql
#ALTER table user_info MODIFY id int(15) PRIMARY KEY AUTO_INCREMENT;#ALTER table user_info drop PRIMARY KEY;
/* To insert into an auto incrementing field without specifing every column in
the table, you can use the key word default in the place of the auto
incrementing column*/INSERTINTO my_table VALUES(default,"test1",222)/*VS */INSERTINTO my_table(name, num)VALUES("test1",222)/*Havingtotypeoutallof the column names except the auto incrementing one
can be very tedious when you have many columns, just use the keyword defualt
instead and you only have totype it once.