From the course: SQL: Data Reporting and Analysis

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Use procedures

Use procedures

- [Instructor] Unlike functions, stored procedures tend to do something. So typically, they perform an action, like edits in data or deletes some. We're going to look at a very simple one that just returns a value. We're going to look at the film not in stock stored procedure, and this is used to work out which copies of a film are on loan from a particular store. Now, we've taken this definition from, stored procedures film not in stock, and to click on that. And it has a definition section, just like the others. And note that this what follows is specific to MySQL. There's also this section above called parameters, and you can see there are three parameters, two input parameters and one output parameter. Now, unfortunately, you can't see the full title here. It says, p film id, so that's the first input, p store id which is the second input, and then an output parameter which we've not seen before, p film count.…

Contents