SQL Server中把查询出来的结果重新编号作为一列

select identity(int,1,1) as id,username into #temp from table1 group by username

select * from #temp
posted @ 2005-04-27 11:32  魔豆  阅读(789)  评论(0编辑  收藏  举报