易截截图软件、单文件、免安装、纯绿色、仅160KB

求一个SQL语句 - MS-SQL Server / 基础类

现有三张表
表A:学生ID、学生名
表B:课程ID、课程名
表C:学生ID、课程ID、成绩

如果想输出下列值:
参加了某门课程的所有学生的学生名、课程名、成绩

SQL语句该怎么写?用一句SQL语句能实现吗? 

SQL code:
select a.学生名,b.课程名,c.成绩
from a ,b,c
where a.学生ID = c.学生ID and c.课程ID = b.课程ID and b.课程名 = '某门课程'


SQL code:
select
a.学生名,b.课程名,c.成绩
from
a,b,c
where
a.学生ID=c.学生ID
and
b.课程ID=c.课程ID
and
b.课程ID=xx


SQL code:
select
a.学生名,b.课程名,c.成绩
from
a,b,c
where
a.学生ID=c.学生ID
and
b.课程ID=c.课程ID
and
b.课程名='xx'


SQL code:
select a,学生名,b.课程名,c.成绩 from a join c on a.学生ID=c.学生ID join b on c.课程ID=b.课程ID where b.课程名='某门课程名'


SQL code:
select a.学生名,b.课程名,c.成绩 from a,b,c
where a.学生ID=c.学生ID and b.课程I


相关问答:

jsp链接sql2000的疑问?



type Exception report


message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jas ......

数据以xml格式返回 - MS-SQL Server / 应用实例

从数据库中查询一张表的数据
select 部门,姓名 from tb
如何才能生成下面的xml格式
XML code:
<folder state="unchecked" label="全部">
   <folder state="unchecked&qu ......

MS SQL作业问题 - MS-SQL Server / 应用实例

如何在SQL2005中设定定时作业,比如说定时清理某些表的数据,
或者是定时的将某些表的数据导出excel!
在线等待,急急急,最好是详细步骤!
之前我做的作业有点问题!
帮UP

参考:http://hi.baidu.com/toiota ......

求一SQL写法 - MS-SQL Server / 基础类

id                           url                   rank     ......

SQL server分解XML - MS-SQL Server / 应用实例

下面是XML初始文件内容
XML code:
<upd:Update xmlns:lar="http://schemas.microsoft.com/msus/2002/12/LogicalApplicabilityRules" xmlns:cmd="http://schemas.microsoft.com/msus/2002/12/Up ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号