SQL SQL SQL SQL SQL SQL

[复制链接]
查看11 | 回复1 | 2007-2-2 15:45:17 | 显示全部楼层 |阅读模式
第一题答案: select T_Stu_Profile.Class_id,T_Stu_Profile.Stu_name,T_Lession.Lession_des from T_Stu_Profile,T_Lession,T_Score where T_Stu_Profile.Stu_id=T_Score.Stu_id and T_Lession.Lession_id=T_Score.Lession_id and T_Score.Score is null 第三题答案: select T_Lession.Lession_des, (select top 1 [Score] as top1 from T_Score where Lession_id=T_Lession.Lession_id order by [Score] desc) as 第一名, (select top 1 [Score] as top1 from T_Score where score not in (select top 1 [Score] as top1 from T_Score where Lession_id=T_Lession.Lession_id order by [Score] desc) and Lession_id=T_Lession.Lession_id order by [Score] desc) as 第二名, (select top 1 [Score] as top1 from T_Score where score not in (select top 2 [Score] as top1 from T_Score where Lession_id=T_Lession.Lession_id order by [Score] desc) and Lession_id=T_Lession.Lession_id order by [Score] desc) as 第三名 from T_Lession 楼主,连题目都换成我的了,也不给点分啊.. ...
回复

使用道具 举报

千问 | 2007-2-2 15:45:17 | 显示全部楼层
抢分拉
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行