1 select identity(int,1,1),* into #tmp
2 select * from #tmp

解决方案 »

  1.   

    select identity(int,1,1),* 
    into #temp
    from yourTableselect * from #tempdrop table #temp
      

  2.   

    按成绩排序:
    select *
           ,(select count(*)+1 form yourtable t1 where t1.score<>t2.score) as 排名
    from yourtable t2其中,score为成绩。
      

  3.   

    SE1() 兄的 
    FORM 变成FROM
      

  4.   

    也不对
    应为
    SELECT *,(SELECT COUNT(*)
                      FROM yourtable bb
                      WHERE bb.score< aa.score) + 1 r
            FROM yourtable aa