From the course: MySQL Database Administration

Unlock this course with a free trial

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

Challenge: Deleting records

Challenge: Deleting records - MySQL Tutorial

From the course: MySQL Database Administration

Challenge: Deleting records

- [Instructor] All right, we're ready for your assignment on deleting data. For this assignment, you're going to be working for Amy Baker, the owner of the candy store. She's got a situation. One of her employees, Margaret Simpson, was recently caught generating fake customer reviews to boost her score. She's obviously had to fire Maggie. And in order to get the database back on track, she would like you to delete Margaret Simpson's record from the Employees table as she's no longer working there. And then remove all data from the Customer Reviews table, but preserve the table structure. She wants to start fresh on that table, so don't delete the entire table, but just empty it of data records. Some helpful hints here. Make sure that you don't drop either of the tables. You just want to remove records. You don't want to impact table structure for this ask. And for the second part of Amy's ask, you should end up with a table containing just column headers, but no data records. And for…

Contents