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 - 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…
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)
Inserting records into tables8m
-
(Locked)
Updating data records7m 33s
-
(Locked)
Challenge: Inserting and updating records1m 30s
-
(Locked)
Solution: Inserting and updating records7m 30s
-
(Locked)
Deleting specific records9m 41s
-
(Locked)
Deleting all records with TRUNCATE10m 28s
-
(Locked)
Challenge: Deleting records1m 32s
-
(Locked)
Solution: Deleting records8m 16s
-
(Locked)
-
-
-
-
-