我看见书上和网上诸如:
declare @t int exec sp_executesql N'select @x=count(*) from a' ,[email protected] int output',@[email protected] outputprint @t
请问一下那个大写的"N"代表什么啊?
------解决方案--------------------
N --Unicode字符
Unicode每个字符占用2个字节
------解决方案--------------------
@ParmDefinition 参数定义的就是一普通字符串,
你可以直接写
EXECUTE sp_executesql @SQLString, @level tinyint ,
@level = @IntVariable
这样没任何问题,写这个参数的目的是让你看的更清楚一点,告诉你这个位置是定义参数的,当然也可以定义多个参数