You access a stored procedure by using an EXEC statement. If a stored procedure does not have any input parameters, the only code required is:
EXEC <stored procedure>
If a stored procedure has input parameters, you can pass in the parameters either by name or by position.
--Execute by name EXEC <stored procedure> @parm1=<value>, @parm2=<value>,. . . --Execute by position EXEC <stored procedure> <value>, <value>,. . .
Executing a stored procedure by position results in code that is more compact; however, it is more prone to errors. If the order of the parameters in a procedure is changed, your code will not be affected if you are executing a procedure and passing the parameters by name.
In order to utilize an output parameter, ...