Multiple Choice
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
Correct Answer:
Verified
Q1: A(n) _ cannot serve as an entire
Q2: Deleting a program unit can be accomplished
Q3: The term _ is identified with a
Q4: What are the main differences between a
Q5: It is considered good form to return
Q7: The RETURN statement in a function is
Q8: A(n) <u>procedure</u> is one type of program
Q9: Deleting a program unit can be accomplished
Q10: _ refer to the parameters that are
Q11: Discuss the techniques available in PL/SQL for