1.创建一个英雄表
create table t_hero (
id int primary key auto_increment,
name varchar(10) unique not null,
gender char(5) check (gender in ('男','女')),
grade char(5) default '5星',
`groups` char(5) check (`groups` in ('毁灭','巡猎','智识','存护','虚无','丰饶')),
tel char(11) default '88888888888');
insert into t_hero values(null,'姬子','女',default,'智识',01020536551);
Query OK, 1 row affected (0.01 sec)
insert into t_hero values(null,'刃','男',default,'毁灭',default);
Query OK, 1 row affected (0.00 sec)
insert into t_hero values(null,'单恒','男','4星','毁灭',default);
Query OK, 1 row affected (0.00 sec)
insert into t_hero values(null,'霍霍','女','5星','丰饶',default);
Query OK, 1 row affected (0.00 sec)
2安装MySQL
配置环境变量