Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Q 2 . ( total 4 0 points ) Function overload. Based on table employees We have used some overloaded functions, such as the function
Qtotal points Function overload. Based on table employees
We have used some overloaded functions, such as the function TOCHAR. This question will provide a chance for you to practice. As we do not discuss package yet, this overload must be competed in one PLSQL block, cannot use two "create" separately.
Qa points On page noteRecords, in Example we have defined a user defined record type EmpSal. We will reuse these codes. InQa you will write a PLSQL block, the program will define a record type EmpSal same as in example Also you will define a function called GetEmpSal with one IN parameter called Empid which has the number as data type. This function will get the employeeid the return a variable of the EmpSal record type. In the executable section, your program will invoke this function will a value of as employe ID then print out the record information. The output is similarsame as that in the example
Qb points Almost same as in Qa You will write a PLSQL block. The program will define the record type EmpSal as in example Also you will define a function called GetEmpSal with one IN parameter, but this time, the IN parameter will be called Empemail which has the data type of varchar The function will the return a variable of the EmpSal record type. In the executable section, your program will invoke this function will a value of 'DAUSTIN' as employe email, then print out the record information. The output is similarsame as that in Qa
Qc points Based on the codes in Qa and Qb you will write one PLSQL block. In the program, you will define a record type EmpSal same as in example Also you will define a function called GetEmpSal with one IN parameter called Empid; also you will define the function name as GetEmpSal, but with one IN parameter called Empemail.
In the executable section in the PLSQL it will get all the employee id for the worker in department Your program will invoke the function, then print out the information about the records for all these people.
Then your program will get all the emails for people who work in department Your program will invoke the function, then print out the information about the records for all these people.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started