Oracle Database 11g: Program with PL/SQL — Question 69

Examine the following package specification.
SQL>CREATE OR REPLACE PACKAGE emp_pkf IS
PROCEDURE search_emp (empdet NUMBER);
PROCEDURE search_emp (empdet DATE);
PROCEDURE search_emp (empdet NUMBER); RETURN VERCHAR2
PROCEDURE search_emp (empdet NUMBER); RETURN DATE

END emp_pkg -
/
The package is compiled successfully
Why would it generate an error at run tune?

Answer options

Correct answer: B

Explanation

The correct answer is B because in PL/SQL, function overloading is not allowed if the functions only differ by return type. Options A, C, and D are incorrect as they misinterpret the rules of function overloading and parameter naming conventions in PL/SQL.