22,209
社区成员
发帖
与我相关
我的任务
分享
declare @col1 nvarchar(20),@col2 nvarchar(20),@col3 nvarchar(20),@str nvarchar(200)
set @col1=' [id] int'
set @col2=' [name] nvarhar(50)'
set @col3=' age int'
set @str='create table pep('+@col1+@col2+@col3+')'
exec sp_executesql @str
select 目标列 into #临时表 from 源表
select * into #temptable from (你查询的那个句子)t
select * into #temptable from TABLE
select .......
into #temp
from .........