MySQL alter表

添加主键:

alter table notify  DROP PRIMARY KEY ; 

alter table notify add primary key (notify_id);

 

添加auto_increment:

alter table user  DROP PRIMARY KEY ; 

alter table user add id int(11) not null auto_increment PRIMARY KEY ;

 

改字段类型:

alter table netdisk modify  disk_name varchar(255);

posted on 2012-04-20 11:00  kingang  阅读(172)  评论(0编辑  收藏  举报

导航