Database Management System LAB Final Q1
Database Management System LAB Final Q1
Michelle M. Esperal
Marks 20.00/20.00
Question 1
Question text
It is use to accept numeric input and return numeric values.
a.
Character function
b.
c.
d.
Number function
Question 2
Question text
Extracts a string of determined length.
Question 2Select one:
a.
Length
b.
INSTR
c.
Trim
d.
SUBSTR
Question 3
Question text
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Based on the given SELECT statement below what would be the possible output?
SELECT TRUNC(563.396,1)FROM DUAL;
Question 3Select one:
a.
500
b.
563.3
c.
563.39
d.
563
Question 4
Question text
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Based on the given SELECT statement below what would be the possible output?
SELECT TRUNC(563.396,-2) FROM DUAL;
Question 4Select one:
a.
563.39
b.
563
c.
500
d.
563.3
Question 5
Correct
Flag question
Question text
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Based on the given SELECT statement below what would be the possible output?
SELECT TRIM(‘K’ FROM LASTNAME)AS TRIM, LASTNAME, DEPARTMENT_ID, MANAGER_ID
FROM EMPLOYEES
WHERE DEPARTMENT_ID = 50
AND MANAGER_ID = 100;
Question 5Select one:
a.
b.
c.
d.
Flag question
Question text
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Based on the given SELECT statement below what would be the possible output?
SELECT LASTNAME,SALARY, RPAD(SALARY,4,’@’)
FROM EMPLOYEES
WHERE SALARY BETWEEN 4000 AND 9000
LASTNAME LIKE ‘%S’;
Question 6Select one:
a.
c.
d.
e.
a.
Single row
b.
Dual table
c.
Number function
d.
Multiple row
Question 8
Question text
This is used to converts the first letter of each word to uppercase and the remaining letters
to lowercase.
a.
Sentence case
b.
lowercase
c.
Upper case
d.
INITCAT
Question 9
Question text
Trims leading or trailing characters (or both) from a character string.
Length
b.
SUBSTR
c.
Trim
d.
INSTR
Question 10
Question text
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Based on the given SELECT statement below what would be the possible output?
SELECT MOD(SALARY,10) AS “EXCESS SALARY”
FROM EMPLOYEES
WHERE SALARY < 5000;
Question 10Select one:
a.
3
3
3
3
3
b.
0
0
0
0
0
c.
0
0
0
0
0
0
d.
3
3
3
3
3
3
Question 11
Question text
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Based on the given SELECT statement below what would be the possible output?
SELECT (LASTNAME||FIRSTNAME), JOB_ID
FROM EMPLOYEES
WHERE SUBSTR (JOB_ID,4)=’REP’;
Question 11Select one:
a.
ABELELLEN SA_REP
TALORJONATHAN SA_REP
GRANTKIMBERLY SA_REP
FAYPAT MK_REP
b.
ABEL ELLEN SA_REP
TALOR JONATHAN SA_REP
GRAN TKIMBERLY SA_REP
c.
ABELELLEN SA_REP
TALORJONATHAN SA_REP
GRANTKIMBERLY SA_REP
d.
ABELELLEN SA_REP
Question 12
Question text
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
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;
Question 12Select one:
a.
b.
c.
d.
a.
Number function
b.
Dual table
c.
Single row
d.
Multiple row
Question 14
Question text
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Based on the given SELECT statement below what would be the possible output?
SELECT INITCAP(LASTNAME||’,’||FIRSTNAME) AS NAME
FROM EMPLOYEES
WHERE JOB_ID LIKE ’%PR%’;
Question 14Select one:
a.
king,steven
hunold,alexander
Ernst,bruce
lorentz,Diana
b.
King,Steven
Hunold,Alexander
Ernst,Bruce
Lorentz,Diana
c.
King’,’Steven
Hunold’,’Alexander
Ernst’,’Bruce
Lorentz’,’Diana
d.
KING,STEVEN
HUNOLD,ALEXANDER
ERNST,BRUCE
LORENTZ,DIANA
Question 15
Question text
It is a table that is owned by the user SYS and can be accessed by all users.
a.
Employees
b.
Dual
c.
Parts
d.
Authors
Question 16
Question text
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Based on the given SELECT statement below what would be the possible output?
SELECT LOWER(LASTNAME||’with a salary of’||SALARY) as Record, LENGTH(LASTNAME) as
Lname
FROM EMPLOYEES
WHERE MANAGER_ID IS NULL
OR SALARY IS NULL;
Question 16Select one:
a.
KING WITH A SALARY OF 24000 4
HUNOLDWITH A SALARY OF 2400 6
b.
c.
d.
a.
Number function
b.
Character function
c.
d.
Multiple row function
Question 18
Question text
Choose the letter of the correct answer based on the table EMPLOYEES as shown below.
Table 1.0 EMPLOYEES
Based on the given SELECT statement below what would be the possible output?
SELECT TRUNC(563.396,2)FROM DUAL;
Question 18Select one:
a.
500
b.
563.3
c.
563.39
d.
563
Question 19
Question text
This is use to find the numeric position of a named character starting at character position n.
a.
SUBSTR
b.
INSTR
c.
Length
d.
Trim
Question 20
Question text
What is the return value if the user try to do the following:
SELECT TRUNC (65.73,-2) FROM DUAL;
a.
600
b.
00
c.
60
d.