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 - MySQL Tutorial
From the course: Advanced MySQL Database Administration
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…
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)
Overview of create, insert, and delete1m 48s
-
(Locked)
Review: Creating a schema3m 24s
-
(Locked)
Review: Creating a table7m 7s
-
Review: Inserting records into a table10m 19s
-
(Locked)
Review: Deleting records10m 40s
-
(Locked)
Importing data from a file10m 21s
-
(Locked)
Challenge: Importing order item data1m 11s
-
(Locked)
Solution: Importing order item data10m 56s
-
(Locked)
Challenge: Importing refund data1m 32s
-
(Locked)
Solution: Importing refund data5m 1s
-
(Locked)
Challenge: Deleting records1m 36s
-
(Locked)
Solution: Deleting records4m 40s
-
(Locked)
Challenge: Import remaining 2012 data45s
-
(Locked)
Solution: Import remaining 2012 data5m 37s
-
(Locked)
Bonus: Load data4m 44s
-
(Locked)
-
-
-
-
-
-
-
-
-
-