From the course: MySQL Database Administration
Unlock this course with a free trial
Join today to access over 24,500 courses taught by industry experts.
Solution: Adding and removing columns - MySQL Tutorial
From the course: MySQL Database Administration
Solution: Adding and removing columns
- [Instructor] All right, this is the solution video for your assignment on altering tables. As a reminder, you're going to be trying to help Amy, the owner of the candy store to remove the hourly_wage column from her employees table, and add an avg_customer_rating column. Let's jump into Workbench and walk through the solution. So the first thing we'll do here is run the USE candystore statement. This selects the candystore schema. You'll also see candystore_old as another schema. Don't worry about that one for now. So before we do anything, and I would recommend taking this approach to any problem, just get to know the schema that you're working with a little bit. So take a look within candystore. See what tables are in there. So we've got candy_products, customer_reviews, and employees, which is the table that we've been asked to work on. So let's take a look at each of those. We can look at employees last. So we've got candy_products, which has a candy_product_id, the name of the…
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)
Creating a schema using the MySQL Workbench UI2m 54s
-
(Locked)
Creating a schema using SQL code4m 27s
-
(Locked)
Creating a table using the MySQL Workbench UI6m 52s
-
(Locked)
Creating a table using SQL code6m 3s
-
(Locked)
MySQL data types5m 40s
-
(Locked)
Challenge: Creating your own schema and tables2m 28s
-
(Locked)
Solution: Creating your own schema and tables12m 1s
-
(Locked)
Adding and removing columns using the MySQL Workbench UI13m 39s
-
(Locked)
Adding and removing columns with SQL code5m 4s
-
(Locked)
Challenge: Adding and removing columns1m 25s
-
(Locked)
Solution: Adding and removing columns6m 59s
-
(Locked)
Dropping schemas and tables6m 45s
-
(Locked)
Challenge: Dropping schemas and tables1m 46s
-
(Locked)
Solution: Dropping schemas and tables2m 22s
-
(Locked)
-
-
-
-
-
-