From the course: Designing Database Solutions for SQL Server 2016

Unlock the full course today

Join today to access over 23,300 courses taught by industry experts.

Modify stored procedure parameters

Modify stored procedure parameters

- [Instructor] Stored procedures can utilize parameters to pass values into the routine and back out of the calling application or user. These are known as input or output parameters. Input parameters allow the user to pass values into the stored procedure to define some additional criteria that they want to incorporate, such a criterion aware clause. This allows the procedure to be much more flexible and able to handle a wide range of requests, rather than being hard-coded to only return the same results every time they're called. Output parameters, on the other hand, allow the stored procedure to return a value back to the user. For instance, if the stored procedure is calculating a value, then it would be convenient to get that value back out as a variable that you can reference elsewhere. Let's take a look at how these work by created a new database, and I'll call mine stored proc parameters DB. Then, inside of this database, we'll create a simple table called DBO dot orders, and…

Contents