1、desc 表名;(查询表中信息)

2、alter table 表名 add 性别 enum('男','女')after id;
(插入列在id之后)

3、alter table 表名 add 新字段名 数据类型() first;
(插入列在第一个位置)

4、drop database 数据库名;
(删除数据库)

5、show create table 表名;
(查看表结构)

6、set password=password(‘密码’);
(修改数据库密码)

时间:2026-02-14 17:45:03
1、desc 表名;(查询表中信息)

2、alter table 表名 add 性别 enum('男','女')after id;
(插入列在id之后)

3、alter table 表名 add 新字段名 数据类型() first;
(插入列在第一个位置)

4、drop database 数据库名;
(删除数据库)

5、show create table 表名;
(查看表结构)

6、set password=password(‘密码’);
(修改数据库密码)
