数据库基础练习题解答Word版

上传人:日度 文档编号:217458467 上传时间:2021-12-02 格式:DOC 页数:6 大小:25.50KB
返回 下载 相关 举报
数据库基础练习题解答Word版_第1页
第1页 / 共6页
数据库基础练习题解答Word版_第2页
第2页 / 共6页
数据库基础练习题解答Word版_第3页
第3页 / 共6页
数据库基础练习题解答Word版_第4页
第4页 / 共6页
数据库基础练习题解答Word版_第5页
第5页 / 共6页
点击查看更多>>
资源描述

《数据库基础练习题解答Word版》由会员分享,可在线阅读,更多相关《数据库基础练习题解答Word版(6页珍藏版)》请在金锄头文库上搜索。

1、-1、显示系部编号为“”的系部名称!select departname as 系部名称from departmentwhere departno=03-2、查询系部名称中含有“工程”两个字的系的全名。select departname 系部名称from department where departname like%工程%-3、查询共有多少个系部。select departname 系部名称from departmentcompute count(departname)-4、查询“01”年级共有多少个班级。select count(classname) as 班级总数from classwh

2、ere classname like01%-5、查询在“周二晚”上课的课程名称和教师。select couname as 课程名称,teacher as 教师from coursewhere schooltime=周二晚-6、查询姓“张”、“陈”、“黄”同学的的基本信息,要求按照姓名降序排序。select *from studentWhere stuname like张% or stuname like陈% or stuname like黄%order by stuname desc-7、按系部统计课程的平均报名人数,要求显示系部编号、平均报名人数。select departno 系部编号,a

3、vg(willnum) 平均报名人数from coursegroup by departno-8、按系部统计课程的平均报名人数,要求显示系部名称、平均报名人数。select departname 系部名称,avg(willnum) 平均报名人数from course,department where course.departno=department.departnogroup by departname-9、统计各系的班级数,要求显示系部编号、系部名称、班级数量。select class.departno 系部编号,departname 系部名称,count(classname) 班级数量

4、from class,department where class.departno=department.departnogroup by class.departno,departname-10、查询“甘蕾”同学选修的课程名、学分、上课时间、志愿号,按志愿号排序查询结果。select couname 课程名,credit 学分,schooltime 上课时间,willorder 志愿号from course,stucou,studentwhere course.couno=stucou.couno and student.stuno=stucou.stuno and stuname=甘蕾o

5、rder by willorder -11、显示“电子商务班”班的选修报名结果。要求有学号、姓名、课程编号、-课程名称、志愿号,并按学号、志愿号排序。select student.stuno 学号,stuname 姓名,stucou.couno 课程编号,couname 课程名称,willorder 志愿号from student,course,stucou,classwhere course.couno=stucou.couno and student.stuno=stucou.stuno and class.classno=student.classno andclassname=00电子

6、商务order by student.stuno,willorder-12、学号为“”的学生第一志愿报名选修“”这门课程,请在数据库中进行处理。insert stucouvalues (00000025,001,1,报名,NULL)-13、删除学号为“”的学生的选课报名信息。delete stucouwhere stuno=00000025-14、将“多媒体”班级“杜晓静”同学的名字修改为“杜小静”。update studentset stuname=杜小静from class,studentwhere class.classno=student.classno andclassname=00

7、多媒体 andstuname=杜晓静-15、“电子商务”班的“林斌”同学申请将已选修的“网络信息检索原理与技术”课程修改为“Linux操作系统”。update stucouset couno=(select couno from course where couname=Linux操作系统)from course,stucou,student,classwhere course.couno=stucou.couno and student.classno=class.classno andstucou.stuno=student.stuno andclassname=00电子商务 and stuname=林斌 and couname=网络信息检索原理与技术 (注:可编辑下载,若有不当之处,请指正,谢谢!)

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 高等教育 > 大学课件

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号