复制代码 代码如下:
declare @table table ([values] varchar(10))
insert into @table select ‘aaa’
union all select ‘ccc’
union all select ‘eee’
union all select ‘ddd’
union all select ‘bbb’
select [rowid] = identity (int, 1, 1), * into # from @table
select * from #
drop table #