Question: Using the MI database, create an SQL script named MI-Create-Views-and- Functions.sql to answer parts M-R M. Write an SQL statement to create a view called

 Using the MI database, create an SQL script named MI-Create-Views-and- Functions.sql

Using the MI database, create an SQL script named MI-Create-Views-and- Functions.sql to answer parts M-R M. Write an SQL statement to create a view called PurchaseSummaryView that shows only ITEM.ItemID, ????.PurchaseDate, ITEM.Item Description, and ITEM.PriceUSD Run the statement to create the view, and then test the view with an appropriate SQL SELECT statement. Create and test a user-defined function named StoreContactAndPhone that combines two parameters named StoreContact and ContactPhone into a concatenated data field formatted StoreContact: ContactPhone (including the colon and space) N. O. Write an SQL statement to create a view called StorePurchaseHistoryView that shows STORE.StoreName, STORE.Phone, STORE.Contact, ITEM.ItemID, ITEM.PurchaseDate, ITEM.ItemDescription, and ITEM.PriceUSD. Run the state ment to create the view, and then test the view with an appropriate SQL SELECT statement. Write an SQL statement to create a view called StoreContactPurchaseHistoryView that shows STORE.StoreName, the concatenated result of STORE.Phone and STORE.Contact from the StoreContactAndPhone function, ITEM.ItemID, ITEM.PurchaseDate, ITEM.ItemDescription, and ITEM.PriceUSD. Run the state- ment to create the view, and then test the view with an appropriate SQL SELECT statement. P

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!