⑴ 学生—课程”数据库中包含学生表、课程表、学生选课表3个表
看一抄下。等袭下写写。
1.
select sno, ssex from student where
sname like '王%'
2.
select sname from student where
sname not like '刘%'
3.
select sname from student where
sage <20
4.
select sage from student order by sage asc
5. select count(*) from student where sno in (
select sno from sc)
⑵ 数据库中建立学生表课程表选课表及其联系
以 access 为例,建立数据表如下:
1、学生表
⑶ 数据库中包含学生表、课程表、学生选课表3个表,分别是什么
1、SELECT
课程号,
课程名,
课程学分
FROM
课程
WHERE
课程号
IN(SELECT
课程号
FROM
选课
GROUP
BY
课程号
HAVING
COUNT(学生号)
BETWEEN
2
AND
4
)
2、SELECT
MAX(成绩)
-
MIN(成绩)
AS
分数之差
FROM
选课
倘若要每门课程相差
SELECT
课程,
MAX(成绩)
-
MIN(成绩)
AS
分数之差
FROM
选课
GROUP
BY
课程