帮你测试了 是可以的呀
表结构? 假设课程表 课程ID 课程名选课表 课程ID 学生ID select 课程名 from 课程表 where 课程ID not in (select 课程ID from 选课表)