dbms-pre-lim-pre-finals.pdf - Question 1 Answer saved Marked out of 1.00 Flag question Question text Choose the letter of the correct answer based on

dbms-pre-lim-pre-finals.pdf - Question 1 Answer saved...

This preview shows page 1 - 10 out of 54 pages.

Question 1 Answer saved Marked out of 1.00 Flag question Question text Choose the letter of the correct answer based on the table EMPLOYEES as shown below. Table 1.0 EMPLOYEES What query should be used in order todisplay the firstname in capitalized format rename the column as pangalan whose job_id is equal to ‘SA_REP’. Select one: a. SELECT FIRSTNAME AS PANGALAN FROM EMPLOYEES WHERE JOB_ID = 'SA_REP'; b. SELECT UPPER(FIRSTNAME) AS PANGALAN FROM EMPLOYEES WHERE JOB_ID = 'SA_REP'; c. SELECT UPPER(FIRSTNAME) PANGALAN FROM EMPLOYEES
Image of page 1
WHERE JOB_ID = 'SA_REP'; d. SELECT UPPER(FIRSTNAME) AS PANGALAN FROM EMPLOYEES WHERE JOB_ID IS 'SA_REP'; Question 2 Answer saved Marked out of 1.00 Flag question Question text Choose the letter of the correct answer based on the table EMPLOYEES as shown below. Table 1.0 EMPLOYEES What query should be used in order to display the employees lastname concatenated to salary. Format the salary column to 6 character long left padded with ‘*’ as special character for all employees whose manager_id is null or salary between 4000 and 6000 Rename the column as employees and their Salaries Select one: a. SELECT (FIRSTNAME||RPAD(SALARY,6,'*')) AS "EMPLOYEES AND THEIR SALARIES" FROM EMPLOYEES WHERE MANAGER_ID IS NULL OR SALARY BETWEEN 4000 OR 6000;
Image of page 2
b. SELECT (FIRSTNAME||RPAD(SALARY,6,'*')) AS "EMPLOYEES AND THEIR SALARIES" FROM EMPLOYEES WHERE MANAGER_ID IS NULL OR SALARY BETWEEN 4000 AND 6000; c. SELECT (FIRSTNAME||RPAD(SALARY,6,'*')) AS "EMPLOYEES AND THEIR SALARIES" FROM EMPLOYEES WHERE MANAGER_ID = NULL OR SALARY BETWEEN 4000 AND 6000; d. SELECT (FIRSTNAME||(SALARY,6,'*')) AS "EMPLOYEES AND THEIR SALARIES" FROM EMPLOYEES WHERE MANAGER_ID IS NULL OR SALARY BETWEEN 4000 AND 6000; Question 3 Answer saved Marked out of 1.00 Flag question Question text Choose the letter of the correct answer based on the table EMPLOYEES as shown below. Table 1.0 EMPLOYEES
Image of page 3
Based on the given SELECT statement below what would be the possible output? SELECT FIRSTNAME, SALARY, LPAD(SALARY * 0.10 + SALARY 100, 8, ‘$’) AS BONUS FROM EMPLOYEES WHERE DEPARTMENT_ID NOT IN (10, 110, 50 AND SALARY=17000; Select one: a. NENA 17000 $17000LEX17000 $17000LEX17000 $17000 b. NENA 17000 17000 $LEX1700017000 $LEX1700017000 $
Image of page 4