假设学生表为students,课程表为courses,选课表为selections,可使用以下SQL语句查询黄同学不学的课程号:

SELECT course_id FROM courses WHERE course_id NOT IN ( SELECT course_id FROM selections WHERE student_id = ( SELECT student_id FROM students WHERE student_name = '黄同学' ) );

如何用sql语句查询黄同学不学的课程号

原文地址: https://www.cveoy.top/t/topic/hoKx 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录