declare @strSQL varchar(8000)
declare @i integer
create table [#temp]([style] varchar(20),stylename varchar(50))
set @i=1select @strsql="alter table #temp add  [" + rtrim(ltrim(str(@i))) + "] numeric(10,2) default 0"  --这句通不过
我以前用上面的语句,在sql2000中是通过的,现在在sql2008中通不过了,双引号用来连接字符串出错请问哪里要设置一下,才能使双引号"可以在sql查询语句 中使用(因为存储过程中使用了大量的双引号,不想改成单引号)