1.
--声明table
declare @tb table(ID int)
--插入数据
insert @tb select 1
--查询
select * from @tb2. --用动态SQL
declare @colName varchar(20)
set @colName='ID'
exec('create table tb('+@colName+' int)')
--声明table
declare @tb table(ID int)
--插入数据
insert @tb select 1
--查询
select * from @tb2. --用动态SQL
declare @colName varchar(20)
set @colName='ID'
exec('create table tb('+@colName+' int)')
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货