Which of the following code fragments would not raise an error?
A) CREATE OR REPLACE FUNCTION ship_calc(p_qty IN NUMBER)
IS
Lv_ship_num NUMBER(5,2) ;
BEGIN
IF p_qty > 10 THEN
Lv_ship_num := 11.00;
ELSE
Lv_ship_num := 5.00;
END IF;
RETURN lv_ship_num;
END;
B) CREATE OR REPLACE ship_calc(p_qty)
RETURN NUMBER
IS
Lv_ship_num NUMBER(5,2) ;
BEGIN
IF p_qty > 10 THEN
Lv_ship_num := 11.00;
ELSE
Lv_ship_num := 5.00;
ENDIF;
RETURN lv_ship_num;
END;
C) CREATE OR REPLACE FUNCTION ship_calc(p_qty IN NUMBER)
RETURN NUMBER
IS
Lv_ship_num NUMBER(5,2) ;
BEGIN
IF p_qty > 10 THEN
Lv_ship_num := 11.00;
ELSE
Lv_ship_num := 5.00;
END IF;
RETURN lv_ship_num;
END;
D) CREATE OR REPLACE FUNCTION ship_calc(p_qty IN NUMBER)
RETURN NUMBER
BEGIN
IF p_qty > 10 THEN
Lv_ship_num := 11.00;
ELSE
Lv_ship_num := 5.00;
END IF;
RETURN lv_ship_num;
END;
Correct Answer:
Verified
Q27: How many input values does the following
Q28: The default behaviors of value passing can
Q29: Which of the following statements is incorrect?
A)
Q30: All of the following represent restrictions on
Q31: _ refer to the parameters that are
Q33: The _ purity level does not modify
Q34: Which of the following correctly creates a
Q35: The term _ is identified with a
Q36: _ refer to the arguments that are
Q37: Deleting a program unit can be accomplished
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents