SELECT INITCAP (Lastname - ',' - Firstname) AS "NAME" FROM Employees WHERE Job - Id 'AD - PRES' OR Job - Id 'IT - PROG'
SELECT INITCAP (Lastname - ',' - Firstname) AS "NAME" FROM Employees WHERE Job - Id 'AD - PRES' OR Job - Id 'IT - PROG'
Direction:
Use the Employees table (copy and paste the code in SQL command line)
Based on the given table: Employees table as shown below, write the PL/SQL that applies single row
function in order to get the printed output per number. Write your answer in a short bond paper.
Copy and paste the PL/SQL code on the space provided after each questions.
1.
SELECT INITCAP(lastname||','||firstname) AS "NAME"
FROM employees
LPAD(salary*1.1-100,8,'$') AS "BONUS"
FROM employees
3.
RPAD(salary,4,'@')
FROM employees
4.
SELECT
LOWER(lastname || ’with a salary of’ || salary)),
LENGTH(lastname) AS “LNAME”
FROM employees
WHERE manager_id IS NULL OR salary IS NULL;
5.
SELECT
INITCAP(lastname) || 'that Belongs To Department Id Number' || department_id
AS "NAME",
INSTR(lastname,'A')
FROM employees
WHERE lastname LIKE '%S' AND MOD(salary,2) = 0;
6.
SELECT CONCAT(lastname,firstname), job_id
FROM employees
7.
8.
FROM dual;
10.
FROM dual;