0

Let's say you have a T-SQL stored procedure with this signature:

myProcedure @param1 varchar(10), @param2 varchar(10) OUTPUT 

Is it possible to add an optional parameter after the output parameter like this?

myProcedure @param1 varchar(10), @param2 varchar(10) OUTPUT, @param3 varchar(10) = NULL 
0

1 Answer 1

1

There is no need to ask a question like here because you can simply find it from internet or you can try it and find by creating a sample procedure

Any way the answer is yes you can

i have included a sample procedure for your reference

alter procedure proc1 @param1 nvarchar(10), @param2 int output, @param3 int=null as begin select @param2 end DECLARE @param2 int=10 EXEC proc1 @param1 = 'Calgary', @param2 = @param2 OUTPUT--will give result 10 EXEC proc1 @param1 = 'Calgary', @param2 = @param2 OUTPUT,@param3=100-- will give result 10 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.