select top 3 * from tablename order by 数学成绩 desc

解决方案 »

  1.   

    select distinct 數學成績 into #a  from 表
    select top 3 * from tablename order by 数学成绩 desc
    select top 3 * into #b from #a 
    select * from 表 where 表.數學成績=#b.數學成績
    drop table #a,#b
      

  2.   

    select distinct 數學成績 into #a  from 表
    select top 3 * from 表 order by 数学成绩 desc
    select top 3 * into #b from #a 
    select * from 表 where 表.數學成績=#b.數學成績
    drop table #a,#b
      

  3.   

    select top 3 with ties from 表 order by 数学成绩 desc
      

  4.   

    --上边的有点问题!select top 3 with ties * from tb order by id desc--加上with ties关键字就可以把相同的成绩也显示出来了
      

  5.   

    select distinct b into #a  from a
    select * from a where a.b in (select top 3  T.* from #a T order by T.b desc)
    drop table #a
    這個已經經過測試,能行
      

  6.   

    select  all  top 3 * from tablename order by 数学成绩 desc
      

  7.   

    select   top 3 * from tablename order by 数学成绩 desc 
    这样可以,不过如果有相同成绩的超过3人怎么办?你是要解决这样的问题吗?
      

  8.   

    select top 3 with ties * from tb order by 数学成绩 desc
      

  9.   

    select top 3 * from tb order by 数学成绩 desc
      

  10.   

    select top 3 * from tablename order by 数学成绩 desc