Professional Documents
Culture Documents
Test 2
Test 2
SQL
Max Marks : 30
Problem 1.
Write a query that will print for each employee, employee_id , employee’s full name that will be
concatenation of employee’s first name and last name separated by a space, contact no,
The column heading for the second column should be ‘Full_Name’ and that of the last column
‘Contact_no/Email’.
Problem 2
Write a query to print country name wise, city wise total number of employees working for the
Organization. If a country or a city doesn’t have any employee then also the country and the city
name should be printed. In such as case it should print ‘No Employee’ for employee count.
Problem 3.
Write a query to print the detail of each employee who is drawing the highest salary from his or her
department.
PL/SQL
Max Marks : 70
4.
Create a PL/SQL package that should contain 2 procedures and 1 function. [10]
The first procedure whose access should be private should be receiving job_title as input parameter
and should be returning employee_id, first_name, hire_date and salary of all the employees
The second procedure which should be public should be calling the first procedure with a job_title
and should print the employees details that it receives from the called procedure.
The 3rd member which also should be public should be a function that should be printing the initials
of each employee on first_name and last_name.
Finally test these procedures and functions to ensure that they are giving the output as expected.
[10]