题库 软件开发 题目列表 假设有必修课成绩表course,每位学生的期末考试成绩以...
单选题
假设有必修课成绩表course,每位学生的期末考试成绩以及补考成绩都录入到course表中,学号为20190001的同学想查询一下自己未通过的课程的课程编号与课程名称,那么下面正确的sql语句是
create table `course`(
    `id` int(11) not null auto_increment,
    `sid` int(11) not null comment '学号',
    `cid` int(11) not null comment '课程编号',
    `cname` char(50) not null comment '课程名称',
    `score` int(11) not null comment '分数',
    primary key(`id`) 
)engine = innodb;

A.

select distinct cid,cname from course where cid not in (select cid from course where score > 60 and sid=20190001)

B.

select distinct cid,cname from course where cid in (select cid from course where score < 60) and sid=20190001

C.

select distinct cid,cname from course where cid not in (select cid from course where score > 60) and sid=20190001

D.

select distinct cid,cname from course where cid in (select cid from course where score < 60 and sid=20190001)

题目信息
校招真题
-
正确率
0
评论
19
点击