Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. ( 25 pts.) Write the SQL statements to create a view called as ProductPrice that returns the price of products that are electronics. 2.
1. ( 25 pts.) Write the SQL statements to create a view called as "ProductPrice" that returns the price of products that are electronics. 2. (75 pts.) Create a PL/SQL function called as "GetCustomerinfo" which gets a customer id (cid) and returns the total numbe of buying for the given customer. ( 40pts.) - Function returns 1 if the given customer id does not exist. (5 pts.) - Display "No customer found" message if there is no customer for the given id. (10 pts.) - Display number of buying for each customer. (10 pts.) - Use "DBMS_OUTPUT.PUT_LINE" for displaying output. - Create anonymous block to test function. (10 pts.) Note1: PK Primary Key FK Foreign Key NN Not Null Note2: You can find sample data on the back of the page
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started