5. 统计选修了课程的人数(选修多门时,只计算一次),统计结果保存在一个新表new_table中,表中只有一个字段:学生人数
select count(distinct(学号)) 学生人数 from score1 into dbf NEW_TABLE
查询没有学生选修的课程,查询结果含课程名,开课单位,结果按课程名胜虚保存在new_tabale2中
select 课程名,开课单位 from course ;
where 课程号 not in (select distinct 课程号 from score1) order by 课程名 into dbf NEW_TABLE2
责任编辑:小草