executeSql的问题
sql statement is as followed:
----------------------------------------
declare @tableName VarChar(20)
declare @id VarChar(2)
declare @csName VarChar(30)
set @tableName='js_des'
set @id='1'
declare @strSql varchar(200)
set @strSql='select @csName=count(*) from '+tableName+' where id='+@id
exec sp_executesql @strSql,N'@csName varchar(30) output',@csName output
select @strSql
erro:过程需要参数 '@statement' 为 'ntext/nchar/nvarchar' 类型。