以下是引用djszyyc在2013-3-17 15:50:37的发言:
这条语句为何不能执行
select 班别,姓名,成绩 from cj r1 where(select count(1) from cj r2 where r2.班别=r1.班别 and r2.成绩>= r1.成绩)<=3 order by 班别,成绩
看不明,SQL还是标准些好这条语句为何不能执行
select 班别,姓名,成绩 from cj r1 where(select count(1) from cj r2 where r2.班别=r1.班别 and r2.成绩>= r1.成绩)<=3 order by 班别,成绩