查询尚未选课的所有学生的基本情况SQL语句

2021-01-05 15:22:39 字数 2731 阅读 7830

1楼:匿名用户

你的数据表结构怎么样?

估计是一个学生表,一个选课表,选课表有一个学生id作为外键

select * from students where studentid not in (select distinct studentid from course)

查询尚未选课的所有学生的基本情况。。。sql语句

2楼:骑富贵容娴

select stu.name,course.*from stu,course,chice where stu.

sid=chice.sid and course.c_id=choice.

c_id

and stu.name='张三' --这个bai地方输du入你想查的人zhi名,如果dao这句不写则专查属询全部

3楼:羊舌芙同巳

你的数据抄表结构怎么样?

估计是bai

一个du

学生表,一个选课表,选课表有一zhi个学生daoid作为外键select

*from

students

where

studentid

notin

(select

distinct

studentid

from

course)

用select-sql命令查询尚未选课的所有学生的基本情况

4楼:匿名用户

select * form 学籍

where 学号 not in(select 学号 from 选课)

用select-sql命令建立如下查询:查询尚未选课的所有学生的基本情况 5

5楼:匿名用户

看到你赞同了我以前的

一个回答,在不知道你表结构

回的前提下答,请参考

http://zhidao.baidu.

***/question/278277896.html?oldq=1&from=evaluateto#reply-box-720262004

6楼:痕

还没选课,也就是在选课表里没有他们的学号,如下:

select * from 学生表 where 学号 not in (select 学号 from 选课表)

用sql语句查询所有学生(包括未选课的学生)的学号、姓名(sname)、该学生所选课程的平均分。提示:用外

7楼:

select 学号 = s.sno,姓名 = sname,

平均分 = avg(score)

from student s

left outer join sc

on s.sno=sc.snogroup by s.sno,sname

8楼:匿名用户

select sno,sname,avg(score) from sc,student

where sc.sno=student.sno order by sno;

写出查询没有选课的学生的所有信息的sql语句,要求用in子句和关联两种

9楼:依雨文荣语

第一句中:

制里表示这个form里的数据是提交到insert.asp页面处理)="insert.asp?action(这个action是个变量名称)=insert">

第二句中:

action(这是个变量名称)=request.querystring("action(这里即是第一句中的变量名称)"),结果即是:action="insret"

用sql语句查询所有学员(包括没有选课的学员)的选课情况 (即选修的课程名和成绩),没有选课的学员相关

10楼:匿名用户

select s.sname, c.**ame, sc.scgrade

from s left outer join sc on( s.sno = sc.sno )

left outer join c on ( c.**o = sc.**o )

怎么用sql语句查询一个学生的选课情况,并列出课程信息

11楼:匿名用户

selectstu.name,course.*

fromstu,course,chicewherestu.sid=chice.sidandcourse.c_id=choice.c_id

andstu.name='张三'--这个地方输入你想查的人名,如果这句不写则版查询全部权

12楼:黄埔京

select a.sid from stu a join choice b on a.sid=b.s_id join course c on c.c_id=b.c_id

查询"有几个学生选课"用sql语句查询

13楼:戀貓癖の小魚

select count(distinct 姓名列) from 选课表;

14楼:唐城冬

那你要把表结构写出来啊

SQL查询没有选修1号课程的学生姓名

1楼 匿名用户 select sname from student where not exists select from sc where student sno sc sno and o 1 2楼 匿名用户 select 姓名 sname from student where not exis...

使用SQL语句删除没有学生选修的课程记录

1楼 匿名用户 这个我也答了 delete from 课程 where 课程号 not in select 课程号 from 选课 使用sql语句删除没有学生选修的课程记录 2楼 匿名用户 delete from 课程 where 课程号 not in select 课程号 from 选课 3楼 匿...