alter table add cid int identity(1,1)select * from table where cid=2alter table drop column cid

解决方案 »

  1.   

    select identity(int,1,1) id,* into #temp from table
    select * from #temp where id=2
      

  2.   

    I WILL TRY IT.
    IF IT CAN BE RUN,I WILL GIVE YOUR POINTS.
      

  3.   

    orselect top 1 * from #temp where begindate  in 
    (select top 2 begindate  from #temp order by begindate)
    order by begindate desc
      

  4.   

    select IDENTITY(int, 1,1) AS ID_Num,* into #temp from table
    select * from #temp where ID_Num = 2
    drop table #temp