本题目要求编写SQL语句,
检索出 sc
表中学号为S001的学生选修的而S003学号学生未选修的课程号。
注意:查询结果忽略顺序只对比数据。
提示:MSSQLServer 评测SQL语句。
select cno as 课程号
from sc
where sno='S001'
and cno not in
(select cno
from sc
where sno = 'S003');
/*llll*/
本题目要求编写SQL语句,
检索出 sc
表中学号为S001的学生选修的而S003学号学生未选修的课程号。
注意:查询结果忽略顺序只对比数据。
提示:MSSQLServer 评测SQL语句。
select cno as 课程号
from sc
where sno='S001'
and cno not in
(select cno
from sc
where sno = 'S003');
/*llll*/