![]() ![]() ![]() ![]() |
|||||
|
|||||
樓主 issac ![]()
![]() |
i. CREATE OR REPLACE PACKAGE overload_product_report IS PROCEDURE employee_report (salary NUMBER); PROCEDURE employe_report (emp_id NUMBER); END overload_product_report; Ans: . . . ii. CREATE OR REPLACE PACKAGE overload_list_emp IS PROCEDURE list_ emp_details (emp_id NUMBER, location char); PROCEDURE list_ emp_details (em_id NUMBER, emp_name varchar2); END overload_list_emp; Ans: . . . c. Write a package specification and body called OVER_PACK with overloading procedure ADD_PART. If you call ADD_DEPT with an explicitly provided part number, PL/SQL uses the first version of the procedure. If you call ADD_PART with no part number, PL/SQL uses the second version with sequence number (part_seq.NEXTVAL) generated for the department id. Example: EXECUTE OVER_PACK.ADD_PART (80, 'Steer', 2500) Add a new part into PARTS table with part number 80 and price of 2500. EXECUTE OVER_PACK.ADD_PART ('Wheel', 2400) Add a new part into PARTS table with price of 2400. The part number will be generated by part_seq.NEXTVAL.
本篇文章發表於2006-05-25 18:13
|