一、创建英雄表(hero)
mysql> use db_han
Database changed
mysql> create table hero(
-> name varchar(20) primary key,
-> nickname varchar(20),
-> address varchar(20),
-> `groups` varchar(20),
-> emile int,
-> telephone int);
Query OK, 0 rows affected (0.03 sec)
mysql> insert into hero values("宋江","呼保义","水浒传","北宋",1231,1232);
Query OK, 1 row affected (0.01 sec)
mysql> insert into hero values("卢俊义","玉麒麟","水浒传","北宋",3211,33232);
Query OK, 1 row affected (0.01 sec)
mysql> insert into hero values("吴用","智多星","水浒传","山东",7894,4789);
Query OK, 1 row affected (0.00 sec)
mysql> insert into hero values("菩萨","观音","西游记","天庭",4561,1654);
Query OK, 1 row affected (0.01 sec)
mysql> insert into hero values("姜子牙","姜太公","封神英雄","商朝",3265,,5612);
Query OK, 1 row affected (0.01 sec)
mysql> insert into hero values("姬发","三公子","封神英雄","商朝",2255,525522);
Query OK, 1 row affected (0.00 sec)
mysql> insert into hero values("孙悟空","齐天大圣","西游记","花果山",99666,6699);
Query OK, 1 row affected (0.00 sec)
mysql> insert into hero values("哪吒","那拏天","封神英雄","商朝",4466,62644);
Query OK, 1 row affected (0.00 sec)
mysql> insert into hero values("林冲","豹子头","水浒传","东京",4587,7854);
Query OK, 1 row affected (0.01 sec)
mysql> insert into hero values("司马懿","司马老贼","三国演义","三国",99822,2299);
Query OK, 1 row affected (0.01 sec)