下面是我的SQL查询
select c.course_id,c.course_title,c.course_credits,c.course_status from
course c,(select course_id from completed_course
where student_id='1229CSE00241') as a
where c.course_id!=a.course_id
但是它也显示课程的所有行,但是我只想要c的课程,而
不是a的课程。
select
c.course_id,
c.course_title,
c.course_credits,
c.course_status
from course c
where
c.course_id NOT IN (select course_id from completed_course where student_id='1229CSE00241');
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句