沈 阳 大 学
课程设计说明书 NO.9
4.2.4teacher表
create table teacher
(tno char(10) not null primary key,
tname varchar(10) not null,
Tbirth datetime ,
prof char(10) )
图11 教师信息表图
5.3 向表中添加记录
5.3.1向学生信息表中添加
insert into student values('201',''刘闯',‘男','1987-09-18','03')
insert into student values('202','王昕宇','男','1987-02-07','03')
insert into student values('203','王铎','男', '1987-01-01','03')
insert into student values('204','王新童','女','1987-11-11','03')
insert into student values('205','张天光','男','1987-12-05','02')
insert into student values('206','杨迪','女','1987-11-01','02')
insert into student values('207','王研','女','1987-10-01','01')
insert into student values('208','张熙','男','1987-9-08','03')
insert into student values('209','孙雷','男','1987-12-12','01')
沈 阳 大 学
课程设计说明书 NO.10
insert into student values('210','张新','女','1987-08-28','01')
………………
查看记录
Select * from student
图12 学生表查询结果图
5.3.2向成绩表中添加
insert into score values('201','02',82)
insert into score values('202','05',83)
insert into score values('203','02',78)
insert into score values('204','06',86)
insert into score values('205','02',83)
insert into score values('206','04',78)
insert into score values('207','01',81)
insert into score values('208','03',83)
insert into score values('209','03',88)
insert into score values('210','01',58)
…………
沈 阳 大 学
课程设计说明书 NO.11
查看记录
Select * from score
图13 成绩表查询结果图
5.3.3向教师表中添加数据
insert into course values('01','计算机','11')
insert into course values('02','网络管理','12')
insert into course values('03','专业英语','13')
insert into course values('04','软件工程','14')
…………
查看记录
Select * from course
图14 教师表查询图
5.3.4向课程表中添加数据
insert into teacher values('15','刘飒',','女','1970-6-5','教授')
insert into teacher values('16','齐晓轩','女','1980-1-1','教师')
insert into teacher values('17','周力',','女','1966-3-3','副教授')
insert into teacher values('18','范立南','男','1960-5-5','教授')