查询当前数据库所有的表
show tables;
查询表结构
desc 表名;
查询建表语句
show create table 表名;
修改表
添加字段:alter table 表名 add 字段名 类型(长度) [comment 注释];
修改字段类型:alter table 表名 modify 字段名 新数据类型(长度)
修改字段名和字段类型:alter table 表名 change 旧字段名 新字段名 类型(长度) [comment 注释];
删除字段:alter table 表名 drop column 字段名
修改表名:rename table 表名 新表名