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 字段27、删除表
drop table [if exists] 表名1,表名2……版权声明:本文为qq_34357018原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。