1. Write a CREATE VIEW statement that defines a view named InvoiceBasic that ret
ID: 3546857 • Letter: 1
Question
1. Write a CREATE VIEW statement that defines a view named InvoiceBasic that returns three columns: VendorName, InvoiceNumber, and InvoiceTotal. Then, write a SELECT statement that returns all of the columns in the view, sorted by VendorName, where the first letter of the vendor name is N, O, or P.
3. Create an updatable view named VendorAddress that returns the VendorID, both address columns, and the city, state and zip code columns for each vendor. Then, write a SELECT query to examine the result set where VendorID=4. Next, write an UPDATE statement that changes the address so that the suite number (Ste 260) is stored in VendorAddress2 rather than in VendorAddress1. To verify the change, rerun your SELECT query.
4. Write a SELECT statement that selects all of the columns for the catalog view that returns information about foreign keys. How mant foreign keys are defined in the AP database?
5. Using the Management Studio, modify the InvoiceBasic view created in exercise 1 to sort the result set by VendorName. What clause does the system automatically code to allow the use of an ORDER BY clause in the view?
Explanation / Answer
5. Using the Management Studio, modify the InvoiceBasic view created in exercise 1 to sort the result set by VendorName. What clause does the system automatically code to allow the use of an ORDER BY clause in the view?
By usning the tol management studio you have to midify the view i.e. question# 1.
Already question#1 sorted by vendor name only.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.