标签:
--通过SQL 字符串 查询 获取查出的值sp_executesql
declare @QuerySql nvarchar(500),@uid int,@Ucode varchar(100);
set @QuerySql=‘select @uid=iuserid,@Ucode=cusercode from sys_user where iuserid=1‘
exec sp_executesql @QuerySql,N‘@uid int output,@Ucode varchar(200) output‘,@uid output,@Ucode output
print @uid,@Ucode
标签:
原文地址:http://www.cnblogs.com/Gold-fangjin/p/5586798.html