create table xs(
xh char(6) not null primary key,
xm char(8) not null,
zym char(10) null,
xb tinyint(11) not null default 1,
xsrq date not null,
zxf tinyint(1) null,
zp blob null,
bz text null)
engine = innodb;
create table xs_kc(
xh char(6) not null ,
kch int(4),
cj int(4),
xf int(4),
kcm char(20));
create table kc(
kch int(4) ,
kcm char(20),
kkxq int(2),
xs int(4),
xf int(4));
insert into xs values('15001','刘华','通信工程',1,'1995-04-08',50,null,null),
('15002','张明','计算机',1,'1996-11-01',43,null,null),
('15003','王敏','计算机',0,'1996-08-24',49,null,null),
('15004','闫妍','通信工程',0,'1997-02-14',53,null,null),
('15005','赵林','信息管理',1,'1996-09-26',47,null,null),
('15006','张红','通信工程',0,'1995-12-30',55,null,null),
('15007','程新','信息管理',1,'1998-01-18',40,null,null),
('15008','刘通','计算机',1,'1996-04-22',42,null,null),;
insert into xs_kc values('15001',101,86,null,'计算机基础'),
('15001',101,86,null,'计算机基础'),
('15001',102,78,null,'程序设计'),
('15001',103,91,null,'高等数学'),
('15002',101,79,null,'计算机基础'),
('15002',102,82,null,'程序设计'),
('15002',103,85,null,'高等数学');
insert into kc values(101,'计算机基础',1,68,5),
(102,'程序设计',2,80,4),
(101,'高等数学',2,78,6);
建立学生信息表 学生课程表 课程信息表