You are on page 1of 5

7/31/2019 Quiz 006


Dashboard My courses CS-352-LEC-1913T Week 13: Applying Database View Quiz 006


Question 1

Answer saved

Marked out of
 1.00


If WITH READ ONLY is added on the view (see sample code
below) what is/are the restriction?

CREATE OR REPLACE VIEW STUD_VIEW (USN_ID, LASTNAME,
FIRSTNAME, COURSE)
AS (SELECT USN_ID, LASTNAME, FIRSTNAME, COURSE
FROM STUDENTS
WHERE COURSE = ‘BSCS’)
WITH READ ONLY;

Select one:
a. It restricts the users to add a value where course is equal
to BSCS only

b. NO DML operations allowed on this view.

c. It restricts the users to add a value where course is not


equal to BSCS

d. SELECT statement is not allowed on this view

Clear my choice

Question 2 This of the following is not part of comparison condition used in


Answer saved single row subquery.
Marked out of
1.00 Select one:
a. >

b. IN

c. <

d. <>

Clear my choice

https://blended.amauonline.com/mod/quiz/attempt.php?attempt=1736903&cmid=10892#question-1737060-9 1/5
7/31/2019 Quiz 006

Question 3 Supposed that table: Workers and Employees is consists of the


Answer saved following values.
Marked out of
1.00


Which of the following is the correct example of copying data
 from WORKERS table to EMPLOYEES table where the status is
equal to ‘Regular’?

Select one:
 a. INSERT INTO EMPLOYEES(ID, LASTNAME, DEPARTMENT)
SELECT ID, LASTNAME, DEPARTMENT
FROM WORKERS
WHERE STATUS = ‘Regular’;

b. INSERT INTO EMPLOYEES VALUES (ID, LASTNAME, DEPARTMENT)


SELECT ID, LASTNAME, DEPARTMENT
FROM WORKERS
WHERE STATUS = ‘Regular’;

c. INSERT INTO EMPLOYEES (ID, LASTNAME, DEPARTMENT)


VALUES (SELECT ID, LASTNAME, DEPARTMENT
FROM WORKERS
WHERE STATUS = ‘Regular’);

d. INSERT INTO EMPLOYEES(ID, LASTNAME, DEPARTMENT)


SELECT *
FROM WORKERS

Clear my choice

Question 4 Supposed that table: Workers and Employees is consists of the


Answer saved following values.
Marked out of
1.00

What will be the output if the user uses this PL/SQL.


SELECT ID, LASTNAME, DEPARTMENT
FROM WORKERS
WHERE ID > (SELECT ID FROM EMPLOYEES WHERE STATUS = ‘Probi’);

Select one:
a. No rows or 0 rows are Selected

b. 0 rows are delete in Workers table

c. This will retrieve the record of Mortos and Santiago

d. This will retrieve the record of Subio, Mortos and Santiago

Clear my choice

https://blended.amauonline.com/mod/quiz/attempt.php?attempt=1736903&cmid=10892#question-1737060-9 2/5
7/31/2019 Quiz 006

Question 5 Which of the following joins are mutually exclusive.


Answer saved

Marked out of Select one:


1.00
 a. Natural Join and Using clause

b. Left and Right Outer join


 c. IN and Using clause

 d. Inner join and Outer Join

Clear my choice

 Question 6 Which of the following is not true application of subquery in DML


Answer saved statements?
 Marked out of
1.00 Select one:
 a. Retrieve data from an inline view

b. Copy data from one table to another



c. Delete rows from one table based on rows in a another
table

d. Merge one table to another table.

Clear my choice

Question 7

Not yet
answered

Marked out of
1.00

In the given complex view example what will be the possible


output if this code is run?
CREATE OR REPLACE VIEW DEPT_EMP
AS (SELECT EMPLOYEE_ID, LASTNAME, DEPARTMENT_NAME
FROM EMPLOYEES JOIN DEPARTMENT)

Select one:
a. It will successfully create the view that join 1 table to
another table.

b. Missing with CHECK OPTION

c. Cause an error because the JOIN condition is omitted.

d. The OR REPLACE on the code should be omitted.

Clear my choice

https://blended.amauonline.com/mod/quiz/attempt.php?attempt=1736903&cmid=10892#question-1737060-9 3/5
7/31/2019 Quiz 006

Question 8 Which of the following is the correct example of creating a


Answer saved subquery that will copy all values from employees table to
Marked out of workers where job_id is equal to ST_CLERK;
1.00

Select one:
a. INSERT INTO WORKERS

(SELECT * FROM EMPLOYEES
WHERE JOB_ID = ‘ST_CLERK’);

b. INSERT INTO WORKERS
 (SELECT ALL FROM EMPLOYEES
WHERE JOB_ID = ‘ST_CLERK’;

 c. INSERT INTO WORKERS


SELECT * FROM EMPLOYEES
 WHERE JOB_ID = ‘ST_CLERK’;

d. INSERT INTO WORKERS


 (SELECT * FROM EMPLOYEES
WHERE JOB_ID = ST_CLERK);

Clear my choice

Question 9 Which of the following is the correct example of multiple row


Answer saved subquery?
Marked out of
1.00 Select one:
a. SELECT EMPLOYEE_ID, MIN(SALARY)
FROM EMPLOYEES;

b. SELECT EMPLOYEE_ID, MIN(SALARY)


FROM EMPLOYEES
WHERE SALARY =(SELECT MIN(SALARY) FROM EMPLOYEES;

c. SELECT EMPLOYEE_ID, SALARY


FROM EMPLOYEES
WHERE SALARY =(SELECT MIN(SALARY) FROM EMPLOYEES;

d. SELECT EMPLOYEE_ID, SALARY


FROM EMPLOYEES
HAVING MIN(SALARY);

Clear my choice

https://blended.amauonline.com/mod/quiz/attempt.php?attempt=1736903&cmid=10892#question-1737060-9 4/5
7/31/2019 Quiz 006

Question 10 Which of the following is the correct example of creating a view


Answer saved where LASTNAME ends with letter S rename LASTNAME to
Marked out of SURNAME?
1.00

Select one:
a. CREATE VIEW WORKERS (EMPLOYEE_ID, SURNAME, FIRSTNAME)

AS (EMPLOYEE_ID, LASTNAME AS "SURNAME", FIRSTNAME
FROM EMPLOYEES

WHERE SALARY LASTNAME LIKE '%S');

 b. CREATE VIEW WORKERS (EMPLOYEE_ID, SURNAME, FIRSTNAME)


AS (EMPLOYEE_ID, LASTNAME, FIRSTNAME
FROM EMPLOYEES
 WHERE SALARY LASTNAME LIKE '%S');

 c. CREATE VIEW WORKERS (EMPLOYEE_ID, LASTNAME,


FIRSTNAME)
AS (EMPLOYEE_ID, LASTNAME, FIRSTNAME

FROM EMPLOYEES
WHERE SALARY LASTNAME LIKE '%S');

d. CREATE VIEW WORKERS (EMPLOYEE_ID, SURNAME, FIRSTNAME)
AS (EMPLOYEE_ID, LASTNAME, FIRSTNAME
FROM EMPLOYEES
WHERE SALARY LASTNAME LIKE 'S%');

Clear my choice

Stay in touch
AMA EDUCATION SYSTEM
 https://blended.amauonline.com/helpdesk

https://blended.amauonline.com/mod/quiz/attempt.php?attempt=1736903&cmid=10892#question-1737060-9 5/5

You might also like