4. 查询全部学生都选修的课程的课程号与课程名称。

use hngy
go
/*查询全部学生都选修的课程的课程号与课程名称。*/
use hngy
go
select CourseInfo.CNO 课程编号,CourseInfo.CName 课程名称,CourseStatus.OrdinarySc 课程状态
from CourseInfo,CourseStatus,SC
where CourseInfo.CNO=CourseStatus.CNO and SC.CNO=CourseStatus.CNO
go

你可能感兴趣的:(SQLServer)