台灣最大程式設計社群網站
線上人數
1172
 
會員總數:245252
討論主題:189111
歡迎您免費加入會員
討論區列表 >> Oracle >> Orcale HW問題
[]  
[我要回覆]
回應主題 加入我的關注話題 檢舉此篇討論 將提問者加入個人黑名單
Orcale HW問題
價值 : 40 QP  點閱數:2202 回應數:0

樓主

issac
初學者
5 66
854 79
發送站內信

b. What will happen if the following overloading packages are executed and what are the problems?
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
別忘捐VP感謝幫助你的人 新手會員瞧一瞧
目前尚無任何回覆
   

回覆
如要回應,請先登入.