I am giving few steps:
1. Create a function for addition two number
CREATE FUNCTION AddTwoNumber
(
@first int,
@second int
)
RETURNS int
AS
Begin
declare @add int
SET @add= @first + @second
return @add
end
2. Create a stored procedure that call function
CREATE Procedure proc_AddTwoNumber
(
@first int,
@second int
)
AS
SELECT dbo.AddTwoNumber(@first,@second)
3. call the stored procedure
exec proc_AddTwoNumber 12,13