0% found this document useful (0 votes)
162 views

Database Management System LAB Final Q1

Michelle M. Esperal completed a final lab quiz on database management systems with 20 questions. She answered all questions correctly and received a score of 100% on the quiz. The quiz covered various SQL functions such as TRUNC, SUBSTR, INSTR, LENGTH, LOWER, LPAD, RPAD, and INITCAP and how to use them to manipulate data.

Uploaded by

Michelle Esperal
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
162 views

Database Management System LAB Final Q1

Michelle M. Esperal completed a final lab quiz on database management systems with 20 questions. She answered all questions correctly and received a score of 100% on the quiz. The quiz covered various SQL functions such as TRUNC, SUBSTR, INSTR, LENGTH, LOWER, LPAD, RPAD, and INITCAP and how to use them to manipulate data.

Uploaded by

Michelle Esperal
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Database Management System by

Michelle M. Esperal

FINAL LAB QUIZ 1


Completed on Tuesday, 8 August 2023, 5:28 PM

Marks 20.00/20.00

Grade 100.00 out of 100.00

Question 1
Question text
It is use to accept numeric input and return numeric values.

Question 1Select one:

a.

Character function

b.

Multiple row function

c.

Case manipulation function

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

Mark 1.00 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
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.

RAJS RAJS 50 124

b.

MOURGOS MOURGOS 50 100

c.

ZLOTKEY ZLOTKEY 80 100

d.

ZLOYEY TRINA 80 200


Question 6
Correct

Mark 1.00 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

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.

MOURGOS 5800 5800


b.

MOURGOS 5800 5800@@@@

c.

RAJS 3500 3500


DAVIES 3100 3100
MATOS 2600 2600
VARGAS 2500 2500
HIGGINS 12000 12000

d.

MOURGOS 5800 5800


DAVIES 3100 3100

e.

MOURGOS 5800 5800@@@@


RAJS 3500 3500@@@@
DAVIES 3100 3100@@@@
MATOS 2600 2600@@@@
VARGAS 2500 2500@@@@
HIGGINS 12000 12000@@@
Question 7
Question text
This is use to return one result per row.

Question 7Select one:

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.

Question 8Select one:

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.

Question 9Select one:


a.

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.

NENA 17000 $$$17000


LEX 17000 $$$17000

b.

NENA 17000 17000$$$


LEX 17000 17000$$$

c.

NENA 17000 18600$$$


LEX 17000 18600$$$

d.

NENA 17000 $$$18600


LEX 17000 $$$18600
Question 13
Question text
This is use to return one result per group of row.

Question 13Select one:

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.

Question 15Select one:

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.

kingwith a salary of 24000 4


hunoldwith a salary of 2400 6

c.

KINGWITH A SALARY OF 24000 4


HUNOLDWITH A SALARY OF 2400 6

d.

king with a salary of 24000 4


hunoldwith a salary of 2400 6
Question 17
Question text
This is use to accept character input and can return both character and number values.

Question 17Select one:

a.

Number function

b.

Character function

c.

Case manipulation function

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.

Question 19Select one:

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;

Question 20Select one:

a.

600
b.

00

c.

60

d.

You might also like