Solved

Which of the Following Code Fragments Would Not Raise an Error

Question 32

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:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents