MySQL alter statement usage Summary 1: delete a column alter table Name DROP column name 2: add alter table name ADD column name int not null comment 3: modify the column type information alter table name CHANGE column name new column name (this can be the same as the original column name) bigint not null comment '4: rename the alter table column [TABLE name] CHANGE [column name] [new column name] bigint not null comment 'annotation description 'www.2cto.com 5: rename alter table rename new TABLE name 6: Delete TABLE primary key Alter TABLE name drop primary key7: add primary key alter table sj_resource_charges add CONSTRAINT PK_SJ_RESOURCE_CHARGES primary key (resid, resfromid) 8: ADD index alter table sj_resource_charges add index INDEX_NAME (name); 9: add the unique restriction index alter table sj_resource_charges add unique emp_name2 (cardnumber); 10: Delete the index alter table tablename drop index emp_name; the author is still three feet away