Question: Q 3 . ( 2 0 points ) Package, function returns a record type and function overloading. This question requires to use table Employees and

Q3.(20 points) Package, function returns a record type and function overloading. This question requires to use table Employees and Departments.
In this question, you are required to create a package specification and its body. The package name is called Pkg_Dept_Info,
In the package specification part, you will define a user-defined RECORD type, called Dept_Rec, which has these fields:The first two fields are correspondent to the department id, department name in the departments table. The Mgr_name is the full name (first name, space, last name) of the department manager.
In the package, an overloading function named Get_Dept_Info should be declared. One of the function will accept the department ID, another accepts the department name as its IN parameter; both return a Dept_Rec record type just defined in the same package.
After having successfully compiled the package (specification and body), please write a PL/SQL block, the program will define two cursors, the first one to list those department ID that their location_id are not in 1700, the second cursor lists those department names that have a department manager assigned. Your program will invoke this function Get_Dept_Info two times, first time using its department ID, second time with the department name. Print out the related info you get from the invoking: the department id, department name, the full name of its manager.
 Q3.(20 points) Package, function returns a record type and function overloading.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!