DECLARE @str nvarchar(50)DECLARE @icount INTDECLARE @icnt INTSET @str = 'select @icount = count(1) from test3'EXEC sp_executesql @str,N'@icount int out',@icnt OUTSELECT @icnt AS tt
新建选项卡