Stored Procedures - Parts of a Stored Procedure | Essential SQL
Stored Procedures Unpacked: https://www.udemy.com/stored-procedures-unpacked-learn-to-code-t-sql-stored-procs/?couponCode=YOUTUBE-VDESC-V1. Access the FULL course and downloadable PSDs/practice code/supplemental materials now. Before we go through the steps of creating a stored procedure, let's go over it's main parts. The are three main parts to a stored procedure. They are listed below. Inputs • Store procedures can accept parameter values as inputs. • Depending on how the parameters are defined, modified values can be passed back to the calling program Execution • Stored procedure can execute SQL statement, utilize conditional logic such as IF THEN or CASE statements and lopping constructs to perform tasks. • A stored procedure can call another stored procedure. • Stored procedure can become very handy as they can manipulate results of SQL queries via cursors. Cursors allow the procedure to access results row by row. You can use cursors to loop through a SQL statement’s result. Outputs • A stored procedure can return a single value such as a number or text value or a set or rows as a result set. Also, as mentioned, depending on how the inputs are defined, changed values to inputs can be communicated back to the calling procedure