查询哪些课程没有人选 查询没有人选的课程名
要看你没有人选是用什么表示,如果列名为“是否有人选”0表示没有人选的话,selcet 课程编号,课程名称 from 表名 where 是否有人选=0
SQL查询哪些课程没有人选修,要求列出课程号和课程名select 课程号,课程名 from 表名 where 学号 = null 我这是用的sql2000 语句.还有表的话像你这个问题基本是两张的,只是你没列出.我也只好这样写了.有问题发我消息.
SQL语句查询有那些课程没有被任何同学报选SELECT * FROM 课程表 WHERE 课程号 NOT IN ( SELECT 课程号 FROM 选修表 )
怎么用sql语句查询一个学生没有选的课你那应该最少有三个表的吧 按照名字对应一下吧1 select 姓名 from 学生表 where 学号 in (select 学号 from 成绩表)2 select 任课教师 from 课程表 where 课程号 in (select 课程号 from 成绩表)
急求:SQL查询一门课都没有选的学生信息select 学生表.* from 学生表 left join 课程表 on 课程表课.学生id =学生表.id where 程表.学生id is null;
用SQL语句查询出没有选课的学生名单没选,也就是那一列的值是空值或者是'',所以你可以跟据你这实际的情况加条件 select * from 选课登记表 where (选课 is null or 选课='')
怎么查出没有选数学课的学生,列出学生的编号,姓名,所选的课程名,SQ.select a.id,a.name,b.course from student a,course b where a.id=b.studentid and a.id not in(select studentid from course where course='数学')
急求:SQL查询一门课都没有选的学生信息.非常感谢not exists 或者 not inselect * from 学生表 where 学号 not in (select 学号 from 选课表)
SQL 求帮忙你说的问题太多了.但都是基础题.你具体哪个不太会我可以给你写一下.这么多真. sage int, sdept nvarchar(20) ) create table course( cno char(6) primary key, cname .
写出查询没有选课的学生的所有信息的SQL语句,要求用in子句和关联两.in: select * from student where student_id not in (select distinct student_id from course); join:select s.* from student s left join course c on s.student_id = c.student_id where c.course_id is null;