• The Logic given below has really finished my doubt which i was having in retrieving the output parameter in sql queries...

    I knew it how to fetch the output from front end and actually itried like this in sql queries but i forgot that at the time of retrieval we give output identifier that's why i was making mistake in the retrieval ....

    Thanx,

    Regards Praveen

    [font="Arial Black"]

    ALTER PROC usp_AddTwoIntegers

    @FirstNumber int = 5,

    @SecondNumber int,

    @Answer varchar(30) OUTPUT

    as

    Set @Answer = 'The answer is ' + convert(varchar,@FirstNumber + @SecondNumber)

    Declare @a int, @b-2 int, @C varchar(30)

    Select @a = 1, @b-2 = 3

    Exec usp_AddTwoIntegers @a, @b-2, @C OUTPUT

    Select @C[/font]