select id=identity(int,1,1),* into #t from a
select * from #t
drop table #t