复制代码 代码如下:
DECLARE@tableTABLE([Values]varchar(10))
InsertINTO@tableSelect'AAA'
UNIONALLSelect'CCC'
UNIONALLSelect'EEE'
UNIONALLSelect'DDD'
UNIONALLSelect'BBB'
Select[RowID]=IDENTITY(int,1,1),*INTO#FROM@table
Select*FROM#
DropTABLE#
复制代码 代码如下:
DECLARE@tableTABLE([Values]varchar(10))
InsertINTO@tableSelect'AAA'
UNIONALLSelect'CCC'
UNIONALLSelect'EEE'
UNIONALLSelect'DDD'
UNIONALLSelect'BBB'
Select[RowID]=IDENTITY(int,1,1),*INTO#FROM@table
Select*FROM#
DropTABLE#