From the course: MySQL Database Administration

Unlock this course with a free trial

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

Solution: Stored procedures

Solution: Stored procedures - MySQL Tutorial

From the course: MySQL Database Administration

Solution: Stored procedures

- [Instructor] All right, this is the solution video for your assignment on stored procedures. As a reminder, Joe wants you to take this query shown on the right and bake it into a stored procedure so he can just run the simple call command. Let's jump into workbench and walk through the solution. Alright, so for this assignment we'll be using the Sloppy Joe's schema. And first thing, I just want to show you this call statement, which this is what Joe wants us to use in the end. So I'm going to run that. And you see down here at the bottom we get this error code, procedure Sloppy Joe's SP staff order served does not exist. So just showing you that we haven't created that yet. And by the end of this solution video, we will create this and that's what Joe wants. So this is the query that we want to embed in the stored procedure. I'll ditch this comment. And first let me show you the create procedure. And we're just going to take this name here and put that there. And then we say begin…

Contents