問題詳情

QUESTION 11Examine this package:CREATE OR REPLACE PACKAGE discountsISg_id NUMBER := 7829;discount_rate NUMBER := 0.00;PROCEDURE display_price (p_price NUMBER);END discounts;/CREATE OR REPLACE PACKAGE BODY discountsISPROCEDURE display_price (p_price NUMBER)ISBEGINDBMS_OUTPUT.PUT_LINE('Discounted '||TO_CHAR(p_price*NVL(discount_rate, 1)));END display_price;BEGIN/discount_rate := 0.10;END discounts;Which statement is true?Long
(A)The value of DISCOUNT_RATE always remains 0.00 in a session.
(B)The value of DISCOUNT_RATE is set to 0.10 each time the package is invoked in a session.
(C)The value of DISCOUNT_RATE is set to 1.00 each time the procedure DISPLAY_PRICE is invoked.
(D)The value of DISCOUNT_RATE is set to 0.10 when the package is invoked for the first time in a “session”.

參考答案

答案:D
難度:非常困難0
統計:A(0),B(0),C(1),D(0),E(0)