日期:2014-05-18 浏览次数:20760 次
SELECT * FROM 学生视图 AS T WHERE (SELECT COUNT(1) FROM 学生视图 AS B WHERE B.学生ID = T.学生ID AND B.分数 > T.分数) < 1
------解决方案--------------------
select * from tb t where 分数=(select max(分数) from tb where 学生ID=t.学生ID)
------解决方案--------------------
select * from tbl a where not exists(select 1 from tbl b where a.学生ID=b.学生Id and a.score<b.score)
------解决方案--------------------