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.
Challenge: Stored procedures - MySQL Tutorial
From the course: MySQL Database Administration
Challenge: Stored procedures
- [Instructor] All right, we are ready for your assignment on stored procedures. So for this assignment, you're going to be working with Joe again from the Sloppy Joe's restaurant. As he scales up his business, he'd like to have a very quick way to query how many orders each staff member has served all time. He's not a database pro at all, so he wants us to be as simple as possible. He would love something as simple as a one line call, which will enable him to pull up those results. So take a look at this select statement here with a group by. This is the report that you're going to try to be baking into a new stored procedure called sp_staffOrdersServed. Again, this isn't a super complicated query to put into a stored procedure. But I think it's a very good example of a real-world situation where you have Joe who really isn't going to be writing SQL queries, he's just trying to run his business. But he would love this report and putting in the one line called sp_staffOrdersServed is…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
(Locked)
Creating an index4m 41s
-
(Locked)
The UNIQUE constraint4m 8s
-
(Locked)
The NOT NULL constraint3m 59s
-
(Locked)
Challenge: Indexes and constraints1m 12s
-
(Locked)
Solution: Indexes and constraints9m 24s
-
(Locked)
Stored procedures6m 27s
-
(Locked)
Challenge: Stored procedures2m 3s
-
(Locked)
Solution: Stored procedures4m 23s
-
(Locked)
Triggers7m 50s
-
(Locked)
Challenge: Triggers1m 41s
-
(Locked)
Solution: Triggers5m 8s
-
(Locked)
-
-