Why would it generate an error at run tune?

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?

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?

A.
Because function cannot be overload

B.
Because function cannot differ only in return type.

C.
Becauseall the functions and procedures In the package cannot have the same number of
parameters with the same parameter name

D.
Because the search EMP (EMPDET NUMBER) procedure and the SEARCH_DEPT (EMPDET
NUMBER) cannot have identical parameter names and data types



Leave a Reply 6

Your email address will not be published. Required fields are marked *


piero

piero

b
(with return type are intended function, not procedure)

Alisa

Alisa

Functions that differ ONLY in their return type cannot be overloaded