From the course: Advanced MySQL Database Administration

Unlock this course with a free trial

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

Solution: Testing your trigger system

Solution: Testing your trigger system - MySQL Tutorial

From the course: Advanced MySQL Database Administration

Solution: Testing your trigger system

- [Instructor] All right, this is the solution video for your assignment on testing your trigger. So in the previous assignment, we created a trigger to update the orders table anytime a new record was inserted into order items. In this assignment, we're going to be testing that trigger out by inserting data into the order items table and we'll also insert some data into the order item refunds table for the same time period, while we're at it. So let's jump into Workbench, and I'll walk you through this. All right, so before we do anything else, the first thing that I want to do is just get a good luck at what's going on in that orders table. And I think the main thing I want to know is the number of records that we have. So I'm just going to do a select count star from orders. And that's all we really need to do. And we see we have 10,033 records. I'm actually going to note that here just so it's easy and I don't forget the number. So this is 10,033 records before insert. And if…

Contents