Question: database mysql Create and populate the table CARS so that you get the following: Create a view called CHEAPCARS that lists the NAME and COST

 database mysql Create and populate the table CARS so that you

database mysql

Create and populate the table CARS so that you get the following: Create a view called CHEAPCARS that lists the NAME and COST of the cars that cost under $25,000 and show the results of the view. Alter the view to now display the cars costing under $30,000 Add a new column to the view so that now it displays SELL_PRICE (which is a 15% markup on the COST). Reduce the COST of all cars in the CHEAPCARS view by $500 and confirm that the COST has also changed in the underlying CARS table. Drop the CARS table. What happens if you try to (SELECT *) with the CHEAPCARS view? Recreate and populate the CARS table. Now try reusing the statement you tried in question 6. What happens? Use three SELECT statements and combine them using the UNION operator to create the view FAVOURITECARS for id's 2, 5, and 7

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!