MySQL删除主键和添加自增主键

删除主键:

mysql> alter table student drop primary key;


添加自增主键:

mysql> alter table student add id int not null auto_increment, add primary key (id);

你可能感兴趣的:(Database)