老大,sql:order by 分数那个字段 desc(降序)排序

解决方案 »

  1.   

    select IDENTITY(int,1,1) as id,stu_id,sum(score) as score into #Temp from tablename group by stu_id order by sum(score) desc
      

  2.   

    select distinct 分数 order by 分数 desc
      

  3.   

    select distinct 分数 order by 分数 desc
    看楼上多精辟
      

  4.   

    to:zxhong(红透半边天) 
    请问你的select IDENTITY(int,1,1) as id,stu_id,sum(score) as score into #Temp from tablename group by stu_id order by sum(score) desc
    是什么意思!!
    水平有限实在看不懂
    请给个明确的注释!!
    不胜感激!!
      

  5.   

    select IDENTITY(int,1,1) as id,stu_id,sum(score) as score into #Temp from tablename group by stu_id order by sum(score) desc
    没错