数据库题,设有一个学生—课程数据库,其中包括三个表

数据库题,设有一个学生—课程数据库,其中包括三个表,第1张

1.查询所有学生的学号、姓名、所在系

Select sno,sname,sdept

From student

2查询全体学生的学号、姓名、性别,年龄,系别的信息

Select

From student

3查询全体学生的姓名及其出生年份

Select sname,datadiff(year,sage,2010) as 出生年份

From student

4查询信息工程系全体学生的名单

Select sname

From student

Where sdept=’信息工程系’

5查询所有年龄在20岁以下的学生姓名以及年龄

Select sname,sage

From student

Where sage<20

6查询考试成绩不及格的学生的学号

Select sno

From score

Where grade<60

7查询年龄在20-25(包括20、25)之间的学生的姓名、系别和年龄

Select sname,sdept,sage

From student

Where sage>=20 and sage<=25

8查询不在软件系、网络系、也不在外语系学生的姓名和性别

select sname,sex

from student

where sdept <>'软件系、网络系、外语系'

9查询所有姓李且全名为三个汉字的学生的姓名、学号、和性别

select sname,sno,sex

from student

where sname like '李_ _'

10查询姓名中第二个字为'阳'字的学生的姓名

select sname

from student

where sname like '_阳%'

11查询信息工程系年龄在20岁以下的学生的姓名

select sname

from student

where sage<20 and sdept='信息工程系'

12查询选修了3号课程的学生的学号及其成绩,查询结果按分数的降序排列

select sno,grade

from score

where cno='3'

order by grade desc

13查询全体学生的学号、姓名等情况,结果按照所在系的升序排序,同一系的按年龄降序排列

select sno,sname

from student

order by sdept asc,sage desc

14统计学生总人数

select count() as 人数

from student

15查询选修课课程的学生人数

select count() as 人数

from score

16计算1号课程的学生平均分数

select avg(grade) 均分

from score

where cno='1'

17查询选修了1号课程的学生最高分数

select max(grade) 最高分

from score

where cno='1'

18求各课程号及相应的选修课人数

select cno,distinct(sno)

from score

group by cno

19查询选修了3门以上课程的学生号

select sno

from score

group by sno

having count(cno)>3

20查询选修2学分的课程且该课程的成绩在90分以上的所有学生的姓名

select sname

from student,course,score

where studentsno=scoresno and coursecno=scorecno and ccredit=2 and grade>90

21查询每个学生的学号、姓名、选修的课程号和成绩

select studentsno,sname,cno,grade

from student,score,course

where studentsno=scoresno and scorecno=coursecno

22查询所有选修了1号课程的学生姓名

select sname

from student,score

where studentsno=scoresno and scorecno='1'

23查询选修了课程名为“计算机信息管理”的学生的学号和姓名

select sno,sname

from student,course,score

where studentsno=scoresno and coursecno=scorecno

and cname='计算机信息管理'

希望能给你帮助 差不多一样

理论与实践两部分课程。

理论课程包括计算机网络技术基础、路由和交换基础、网络互联技术、网络布线工程、防火墙技术。

实践课程的内容包括掌握网线制作与测试中常用设备的使用与使用技巧,熟练掌握局域网组建。”

掌握局域网组建中至少一种网络 *** 作系统软件的安装、设置和维护使用,掌握网络服务的安装与配置。

以上就是关于数据库题,设有一个学生—课程数据库,其中包括三个表全部的内容,包括:数据库题,设有一个学生—课程数据库,其中包括三个表、计算机网络技术主要学什么、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/sjk/9431989.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-28
下一篇 2023-04-28

发表评论

登录后才能评论

评论列表(0条)

保存