标签:
今天遇到一个问题:想把sql字符串在SQL Server 中执行了,并获取执行的结果
DECLARE @tablename NVARCHAR(300); SET @tablename=‘select @table3 = count(1) from UserVisitLog‘; DECLARE @newtablename NVARCHAR(300); exec sp_executesql @tablename, N‘@table3 NVARCHAR(300) OUT‘,@newtablename OUT PRINT @newtablename
标签:
原文地址:http://www.cnblogs.com/stevenjson/p/4420527.html