Table_Name : Column(s) Restaurants : RestaurantName, Location, Type Dishes: Rest
ID: 3743705 • Letter: T
Question
Table_Name : Column(s)
Restaurants : RestaurantName, Location, Type
Dishes: RestaurantName, DishName
Sales: RestaurantName, DishName, SaleDate, SaleTime, Quantity, SalesPrice
Given the schema above write the SQL to answer the following questions.
1. Add a Dish for ‘Chik-Fil-A’ that is named ‘French Fries’.
2. Change the Type of restaurant for ‘Campisis’ to ‘Pizza’.
3. Remove the Quantity column from the Sales table.
4. Remove all Sales that have a SalesPrice less than $5.
5. What Sales have a NULL DishName?
Explanation / Answer
Ans1 update Dishes set Dishname='Chik-Fil-A' where Dishname='French Fries';
Ans2 update Restaurants set type='Pizza' where type='Campisis';
Ans3 Alter table sales drop column Quantity;
Ans4 Delete from Sales where salesPrice<5;
Ans5 Select * from Sales where DishName IS NULL;
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.