答:delete from sc where grade < 50
28. 删除信息管理系考试成绩小于50分的学生的该门课程的修课纪录,分别用子查询和多表连接形
式实现。
答:(1) 用连接查询实现
delete from sc from sc join student s on s.sno=sc.sno
where sdept = '信息管理系' and grade < 50
(2)用子查询实现
delete from sc where sno in (
select sno from student where sdept = '信息管理系' )
and grade < 50
29.删除VB考试成绩最低的学生的VB修课记录。
答:delete from sc
where grade = (
select min(grade) from sc
join course c on http://www.77cn.com.cno = http://www.77cn.com.cno
where cname = 'vb')
and cno in(
select cno from course where cname = 'vb')