M1 M2 M3 TA1 1 Granada PDF
M1 M2 M3 TA1 1 Granada PDF
M1 M2 M3 TA1 1 Granada PDF
Administration
TECHNICAL ASSESSMENT
M1, M2, M3
To find the number of airports from the countries table for a supplied country_name.
Based on this number, display a customized message as follows:
Create a PL/SQL block that fetches and displays the six employees with the highest
salary. For each of these employees, display the first name, last name, job id, and
salary. Order your output so that the employee with the highest salary is displayed first.
Use %ROWTYPE and the explicit cursor attribute
%ROWCOUNT.
Write a PL/SQL block to read through rows in the countries table for all countries in region
5 (South America region). Country name must be entered by the user. For each selected
country, display the country_name, national_holiday_date, and national_holiday_name.
Use a record structure (user defined) to hold all the columns selected from the countries
table.
A. Add an exception handler to the following code to trap the following predefined Oracle
Server errors:
NO_DATA_FOUND, TOO_MANY_ROWS, and DUP_VAL_ON_INDEX. (5 pts)
DECLARE v_language_id
languages.language_id%TYPE;
v_language_name
languages.language_name%TYPE;
BEGIN
SELECT language_id, language_name INTO v_language_id, v_language_name FROM
languages WHERE LOWER(language_name) LIKE '<substring%>'; -- for example
'ab%'
Note: Test your block twice using each of the following language substrings: ba, ce.
There are several language_names beginning with “Ba,” but none beginning with “Ce”.