SQL中没有可以得到对记录集顺序值的属性,如果你要,那你就必须在记录集加一个字段标记序号.

解决方案 »

  1.   

    select identity(int 1,1) as id1,* into #t from yourtable 
    select id1 from #t where col='kobe'
      

  2.   

    select T.id1 from aa,(select count(*) as id1 from yourtable) as T where yourtable.col='kobe'
      

  3.   

    select identity(int 1,1) as F1,* into #temp from yourtable 
    select F1 from #temp where [字段名]='kobe'
      

  4.   

    多谢苦行僧和大江东去,不过最后应该加上drop table tablename。