Below is the code for a procedure that will accept a Customer ID as an input parameter and display the Customer ID, Customer Surname and Customer Address. Review the code, then answer the questions...


Below is the code  for a procedure that will accept a Customer ID as an input parameter and display the Customer ID, Customer Surname and Customer Address.




Review the code, then answer the questions that follow.




create or replace procedure sp_customer_details (c_id IN CUSTOMER.cust_id%TYPE,
customer_details out VARCHAR2)
IS
BEGIN
SELECT 'CUSTOMER ID:' || c.cust_id || ', Surname:'|| c.cust_sname || ',ADDRESS:' ||
c.cust_address
into customer_details
from CUSTOMER c
where c.cust_id = c_id;
END;




Q.1 Briefly discuss the advantages of using the %TYPE attribute in the code.


Q.2 Create the code to execute the procedure with exception handling if no customer data is found. Use customer ID C115 in your code.




Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here