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