Question: Q 3 . ( 2 0 points ) Package, function returns a record type and function overloading. This question requires to use table Employees and
Q 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 PkgDeptInfo,
In the package specification part, you will define a userdefined RECORD type, called DeptRec, which has these fields:The first two fields are correspondent to the department id department name in the departments table. The Mgrname is the full name first name, space, last name of the department manager.
In the package, an overloading function named GetDeptInfo should be declared. One of the function will accept the department ID another accepts the department name as its IN parameter; both return a DeptRec record type just defined in the same package.
After having successfully compiled the package specification and body please write a PLSQL block, the program will define two cursors, the first one to list those department ID that their locationid are not in the second cursor lists those department names that have a department manager assigned. Your program will invoke this function GetDeptInfo 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.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
