본문 바로가기

Programming/MS-SQL

mssql rownum 사용하기

select identity(int ,1 ,1) as rownum, a.* into #temp from [tablename] a;

select * from #temp;