21
09/13
动态SQL变量赋值
在动态SQL语句中进行变量的值绑定比较麻烦,这儿做个记录 declare @COUNT int,@sql nvarchar(max) set @sql = 'select @COUNT = count(id) from tbl_sys_dict where root_key = ''WT_TYPE''' execute sp_executesql @sql, N'@COUNT int output', @COUNT output print @COUNT
24
11/11