Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- EXEC ('StoredProcedure @Keyword = ''' + @Key + '''')
- exec('exec <your stored procedure goes here>; select @@RowCount')
- exec(`
- declare @t table (
- <columns go here>
- );
- insert into @t
- exec(''<your exec here>'');
- select @rowcount
- ');
- declare @sql nvarchar(max) = N'exec '+@YOURQUERY + '; set @RowCount = @@RowCount';
- exec sp_executesql @sql, N'@RowCount int output', @RowCount = RowCount output;
- CREATE PROC PawanXX
- (
- @a INT
- ,@b INT OUTPUT
- )
- AS
- BEGIN
- SELECT TOP 2 * FROM X
- SET @b = @@ROWCOUNT
- RETURN @b
- END
- GO
- DECLARE @RC int
- DECLARE @a int
- DECLARE @b int
- EXECUTE @RC = [dbo].[PawanXX]
- @a
- ,@b OUTPUT
- SELECT @RC
Add Comment
Please, Sign In to add comment