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: Deleting records

Solution: Deleting records

- [Instructor] All right, this is the solution video for your assignment on deleting records. As a reminder, Sally is coming for some help cleaning up some bad data that got into the database in the order_item_refunds table. She has these five customer inquiries, which were inaccurately classified as refunds, and she needs help cleaning it up. So let's jump into Workbench and we can walk through the solution. So anytime I do a DELETE or an UPDATE, I usually like to first just run a SELECT * and take a look at the data we're going to be working with. So we've got order_item_refunds is the table that we're supposed to be deleting these records from, so first let's just take a look at what we've got there. We have these 10 records. Sally wants us to delete 131, 32, 45, 151, and 153. So all of those are towards the tail end. They're all coming after the 23rd. Maybe that's when the new person was hired. So first, before I show you how to do this the correct way, I'm going to show you a…

Contents