Skip to content
September 17, 2008 / kiranpatils

How to Test Stored Procedure which has OUTPUT Parameter as an argument?

you have created on SP which takes bunch of args and one of it is OUTPUT parameter which gives ID of last inserted record.. you want to test it using Management studio how can you do it??

Here is the steps :

DECLARE @givemebackID bigint –it can be your parameter name[not compulsory]

exec usp_AddEmployee ‘ABC’,’USA’,@givemebackID= @givemebackID OUTPUT

SELECT @givemebackID

Execute it and enjoy!!!


One Comment

Leave a Comment
  1. Nitin Pranjale / Apr 8 2009 1:38 pm

    Thanks, i was looking for this exact thing.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: