1、修改表名
alter table 旧表名 rename 新表名
2、修改字段的数据类型
alter table 表名 modify 字段名 数据类型
eg:alter table tb_dept modify name varchar(30)
3、修改字段名
alter table 表名 change 旧字段名 新字段名 新数据类型
eg:alter table tb_dept change name newName varchar(30)
4、添加字段
alter table 表名 add 新字段名 数据类型 [first | after 已存在字段名:表示在哪里追加字段]
eg:alter table tb_dept add id int(10) not null;
5、删除字段
alter table 表名 drop 字段名
6、变更字段的位置
alter table 表名 modify 字段1 数据类型 first | after 字段2
7、删除表
drop table [if exists] 表名1,表名2……