MySql数据定义语句
建库:create database 库名 [character set] utf8;
查看库:show databases;
删除数据库:drop database 库名;
指定数据库:use 库名;
建表:create table 表名();
查看表:select *from 表名 ();
修改表名:alter table 旧表名 rename 新表名;
修改字段名:alter table 表名 change 旧字段名 新字段名 类型;
只修改数据类型:alter table 表名 modify 字段名 新的类型;
修改字段位置顺序:alter table 表名 modify 字段名 旧的类型 first/after;
增加字段:alter table 表名 add 名字 类型 [约束关系] [first/after];
删除字段:alter table 表名 drop 字段名;
删除多个字段:alter table 表名 drop 字段名1,drop 字段名2......;
删除表(结构):drop table 表名;