Java知识分享网 - 轻松学习从此开始!    

Java知识分享网

Java1234官方群25:java1234官方群17
Java1234官方群25:838462530
        
SpringBoot+SpringSecurity+Vue+ElementPlus权限系统实战课程 震撼发布        

最新Java全栈就业实战课程(免费)

springcloud分布式电商秒杀实战课程

IDEA永久激活

66套java实战课程无套路领取

锋哥开始收Java学员啦!

Python学习路线图

锋哥开始收Java学员啦!

mysql练习46题 PDF 下载


分享到:
时间:2020-06-07 15:46来源:http://www.java1234.com 作者:小锋  侵权举报
mysql练习46题 PDF 下载
失效链接处理
mysql练习46题 PDF 下载

本站整理下载:
 
相关截图:
 
主要内容:

学生表:
 
 
教师表:
 
课程表:
 
成绩表:
 
初始化数据:
 
 
 
 
CREATE TABLE student(
sno VARCHAR(10) PRIMARY KEY,
sname VARCHAR(20),
sage INT,
ssex VARCHAR(5)
);
CREATE TABLE teacher(
tno VARCHAR(10) PRIMARY KEY,
tname VARCHAR(20)
);
CREATE TABLE course(
cno VARCHAR(10),
cname VARCHAR(20),
tno VARCHAR(20),
CONSTRAINT pk_course PRIMARY KEY (cno,tno)
);
CREATE TABLE sc(
sno VARCHAR(10),
cno VARCHAR(10),
score double(3,1),
CONSTRAINT pk_sc PRIMARY KEY (sno,cno)
);
/*******初始化学生表的数据******/
insert into student values ('s001','张三',23,'男'); 
insert into student values ('s002','李四',23,'男'); 
insert into student values ('s003','吴鹏',25,'男'); 
insert into student values ('s004','琴沁',20,'女'); 
insert into student values ('s005','王丽',20,'女'); 
insert into student values ('s006','李波',21,'男'); 
insert into student values ('s007','刘玉',21,'男'); 
insert into student values ('s008','萧蓉',21,'女');
insert into student values ('s009','陈萧晓',23,'女');
insert into student values ('s010','陈美',22,'女');
commit;
/******************初始化教师表***********************/
insert into teacher values ('t001', '刘阳'); 
insert into teacher values ('t002', '谌燕'); 
insert into teacher values ('t003', '胡明星'); 
commit; );
 
 
 
 
 
/***************初始化课程表****************************/
insert into course values ('c001','J2SE','t002');
insert into course values ('c002','Java Web','t002');
insert into course values ('c003','SSH','t001'); 
insert into course values ('c004','Oracle','t001'); 
insert into course values ('c005','SQL SERVER 2005','t003'); 
insert into course values ('c006','C#','t003'); 
insert into course values ('c007','JavaScript','t002'); 
insert into course values ('c008','DIV+CSS','t001'); 
insert into course values ('c009','PHP','t003');
insert into course values ('c010','EJB3.0','t002');
commit;
/***************初始化成绩表***********************/
insert into sc values ('s001','c001',78.9);
insert into sc values ('s002','c001',80.9); 
insert into sc values ('s003','c001',81.9); 
insert into sc values ('s004','c001',60.9); 
insert into sc values ('s001','c002',82.9); 
insert into sc values ('s002','c002',72.9); 
insert into sc values ('s003','c002',81.9); 
insert into sc values ('s001','c003','59'); 
commit;


 

------分隔线----------------------------

锋哥公众号


锋哥微信


关注公众号
【Java资料站】
回复 666
获取 
66套java
从菜鸡到大神
项目实战课程

锋哥推荐