DECLARE @str nvarchar(50)
DECLARE @icount INT
DECLARE @icnt INT
SET @str = 'select @icount = count(1) from test3'
EXEC sp_executesql @str,N'@icount int out',@icnt OUT
SELECT @icnt AS tt
新建选项卡
DECLARE @str nvarchar(50)
DECLARE @icount INT
DECLARE @icnt INT
SET @str = 'select @icount = count(1) from test3'
EXEC sp_executesql @str,N'@icount int out',@icnt OUT
SELECT @icnt AS tt
新建选项卡
转载于:https://www.cnblogs.com/scarbean/archive/2010/11/12/1875815.html