database.

Student555

 For this assignment, you will use the create my guitar shop SQL database. This work has assignments for Chapters 12 and 13. Submit your scripts in a Notepad document and be sure to identify each script with chapter and exercise number. Save your Notepad document with a .sql file extension.

1) Create a view named customer_addresses that shows the shipping and billing addresses for each customer.

This view should return these columns from the Customers table: customer_id, email_address, last_name and first_name.

This view should return these columns from the Addresses table: bill_line1, bill_line2, bill_city, bill_state, bill_zip, ship_line1, ship_line2, ship_city, ship_state, and ship_zip.

The rows in this view should be sorted by the last_name and then first_name columns.

2) Write a SELECT statement that returns these columns from the customer_addresses view that you created in exercise 1: customer_id, last_name, first_name, bill_line1.

3) Write an UPDATE statement that updates the Customers table using the customer_addresses view you created in exercise 1. Set the first line of the shipping address to “1990 Westwood Blvd.” for the customer with an ID of 8.

    • 10 years ago
    • 3
    Answer(1)

    Purchase the answer to view it

    NOT RATED
    • chapter_12_and_13.zip
    Bids(1)