读书人

SQL 查询有关问题 求救 急

发布时间: 2012-01-19 20:57:58 作者: rapoo

SQL 查询问题 求救 急!~~~
表Table1(Id int,Student char(8),Score int)
Id : 学号
Student : 学生
Score : 成绩

要求查询出有重复的成绩,查询结果只显示“成绩”

谢谢先!!

[解决办法]
select Score from table1 x,table1 y where x.Score=y.Score and x.Id <> y.Id
[解决办法]
select distinct(a.Score) as 成绩 from table1 a,table1 b where a.Score=b.Score and a.Id <> b.Id
[解决办法]
select scort from TABLE1 group by scort having count(*)> 1

读书人网 >SQL Server

热点推荐