mysql> create table student
-> (
-> sno char(12) not null,
-> sname varchar(20) not null,
-> ssex char(2),
-> sbirthday date,
-> address varchar(30),
-> emalil varchar(30)
-> );
Query OK, 0 rows affected (0.29 sec)
mysql> create table class(
-> classno char(8) not null,
-> classname varchar(20),
-> speciality varchar(20),
-> inyear year,
-> num int,
-> header varchar(10),
-> deptno char(4)
-> );
Query OK, 0 rows affected (0.28 sec)
mysql> create table department(
-> deptno char(4) not null,
-> deptname varchar(14),
-> deptheader varchar(20),
-> deptphone int(11)
-> );
Query OK, 0 rows affected (0.27 sec)
mysql> create table course(
-> cno char(5),
-> cname varchar(20),
-> credit varchar(30)
-> );
Query OK, 0 rows affected (0.36 sec)
mysql> create table teacher
-> (tno char(4),
-> tname varchar(10),
-> tsex char(2),
-> deptno char(4),
-> title varchar(10)
-> );
Query OK, 0 rows affected (0.28 sec)
mysql> create table score(
-> sno char(12) not null,
-> cno char(5),
-> result float(4,1)
-> );
Query OK, 0 rows affected (0.28 sec)