Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a . Write a view named InvoiceBasic that displays three columns: VendorName, InvoiceNumber, and InvoiceTotal. b . Then, write a separate SELECT query that shows

a. Write a view named InvoiceBasic that displays three columns: VendorName,
InvoiceNumber, and InvoiceTotal.
b. Then, write a separate SELECT query that shows all the columns in the view, sorted by
VendorName, where the last letter of the vendor name is R, S or T. Use LIKE to do this.
2. a. Write an updatable view named VendorAddress that displays the VendorID, both
address columns, and the city, state, and zip code columns for all vendors.
b. Write a separate SELECT query to show the result where VendorID =4
c. Write an UPDATE statement to change the VendorAddress2 column of the vendor
with id 4 to contain Ste 260 instead of it being part of VendorAddress1 column. Keep it
simple. Update through the VendorAddress view.
d. Re-run the query you wrote in b to see if the update has been made.
3. Write a SELECT query that shows all the columns for the catalog view that displays
information about foreign keys. This requires you to go into System Views and find the
stored view sys.foreign_keys and write the query. The main goal of this exercise is for
you to learn about System Views.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management With Website Development Applications

Authors: Greg Riccardi

1st Edition

0201743876, 978-0201743876

More Books

Students also viewed these Databases questions