Sie sind auf Seite 1von 16

Question 1

Answer saved
Marked out of 1.00

Flag question

Question text
Based on the table EMPLOYEES, DEPARTMENTS and LOCATIONS.
From the given select statement below: What is/are the full name of employee whose
LOCATION_ID is equal to 1700?
SELECT (LASTNAME||','||FIRSTNAME) AS "FULL NAME", DEPARTMENT_ID,
DEPARTMENT_NAME, LOCATION_ID
FROM EMPLOYEES
NATURAL JOIN DEPARTMENTS;
 

Select one:
a. FAY, PAT and DAVIES, CURTIS
b. GIETZ, WILLIAM
c. LORENTZ, DIANA
d. KOCHAR, NENA and LEX, DE HAAN
Clear my choice

Question 2
Answer saved
Marked out of 1.00

Flag question

Question text

This of the following is not part of comparison condition used in single row subquery.

Select one:
a. >
b. <>
c. IN
d. <
Clear my choice

Question 3
Answer saved
Marked out of 1.00

Flag question

Question text

SELECT EMPLOYEES.EMPLOYEE_ID,
EMPLOYEES.LASTNAME,EMPLOYEES.DEPARTMENT_ID,DEPARTMENTS.DEPARTME
NT_ID,DEPARTMENTS.LOCATION_ID
FROM EMPLOYEES JOIN DEPARTMENTS
ON( EMPLOYEES.DEPARTMENT_ID (+)= DEPARTMENTS.DEPARTMENT_ID);

Select one:
a. The given statement would case Cartesian or Cross Join
b. he given statement is not a valid join condition or is incorrect
c. The given statement is Outer Join
d. The given statement is an Equijoin
Clear my choice

Question 4
Answer saved
Marked out of 1.00

Flag question

Question text
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. Cause an error because the JOIN condition is omitted.
c. The OR REPLACE on the code should be omitted.
d. Missing with CHECK OPTION
Clear my choice

Question 5
Answer saved
Marked out of 1.00

Flag question

Question text

Supposed that table: Workers and Employees is consists of the following values.
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 *
FROM WORKERS
b. INSERT INTO EMPLOYEES (ID, LASTNAME, DEPARTMENT)
VALUES (SELECT ID, LASTNAME, DEPARTMENT
FROM WORKERS
WHERE STATUS = ‘Regular’);
c. INSERT INTO EMPLOYEES(ID, LASTNAME, DEPARTMENT)
SELECT ID, LASTNAME, DEPARTMENT
FROM WORKERS
WHERE STATUS = ‘Regular’;
d. INSERT INTO EMPLOYEES VALUES (ID, LASTNAME, DEPARTMENT)
SELECT ID, LASTNAME, DEPARTMENT
FROM WORKERS
WHERE STATUS = ‘Regular’;
Clear my choice

Question 6
Answer saved
Marked out of 1.00

Flag question

Question text

Which of the following is not part of comparison condition used in multiple row subquery.

Select one:
a. =
b. ALL
c. ANY
d. IN
Clear my choice

Question 7
Answer saved
Marked out of 1.00

Flag question

Question text

Supposed that table: Workers and Employees is consists of the following values.
What will be the output if the user uses this PL/SQL.
DELETE FROM WORKERS
WHERE LASTNAME = (SELECT LASTNAME FROM EMPLOYEES WHERE
LASTNAME=Cruz’)

Select one:
a. Employee in Workers table with lastname equal to Cruz will be deleted.
b. Employee in Employees table with lastname equal to Cruz will be deleted.
c. 0 rows are deleted in Workers table
d. 0 rows are deleted in Employees table
Clear my choice

Question 8
Answer saved
Marked out of 1.00
Flag question

Question text

Which of the following is not true about complex view when using INSERT statement?

Select one:
a. All of the choices
b. You cannot add data through a view if the view includes:Group functions
c. You cannot add data through a view if the view includes the pseudocolumn ROWNUM
keyword
d. You cannot modify data in a view if it contains a GROUP BY clause
Clear my choice

Question 9
Answer saved
Marked out of 1.00

Flag question

Question text

Which of the following is the correct example of creating a subquery that copy the values
from employees table to workers table?

Select one:
a. INSERT INTO WORKERS(ID, NAME, POSITION)
SELECT (ID, NAME, JOB_TITLE
FROM EMPLOYEES);
b. INSERT INTO WORKERS(ID, NAME, POSITION)
VALUES (ID, NAME, POSITION
FROM EMPLOYEES);
c. INSERT INTO WORKERS(ID, NAME, POSITION)
SELECT (ID, NAME, POSITION
FROM EMPLOYEES);
d. INSERT INTO WORKERS(ID, NAME, POSITION)
FROM EMPLOYEES;
Clear my choice

Question 10
Answer saved
Marked out of 1.00

Flag question

Question text

Which of the following is the correct query that will create a report that will display the
following: STREET_ADDRESS, CITY, DEPARTMENT_NAME and LOATION_ID? Use
using clause to get the data from two tables.

Select one:
a. SELECT STREET_ADDRESS, CITY, DEPARTMENT_NAME, LOCATION_ID
FROM DEPARTMENTS
JOIN LOCATIONS
USING (LOCATIONS);
b. SELECT STREET_ADDRESS, CITY, DEPARTMENT_NAME, LOCATION_ID
FROM DEPARTMENTS
JOIN LOCATIONS
NATURAL JOIN (LOCATION_ID);
c. SELECT STREET_ADDRESS, CITY, DEPARTMENT_NAME, LOCATION_ID
FROM DEPARTMENTS
JOIN LOCATIONS
USING (LOCATION_ID);
d. SELECT STREET_ADDRESS, CITY, DEPARTMENT_NAME, LOCATION_ID
FROM DEPARTMENTS
JOIN LOCATIONS
WHERE USING (LOCATION_ID);
Clear my choice

8-10

Question 1
Answer saved
Marked out of 1.00
Flag question

Question text

This is a join clause used when the columns in two or more tables have the same but of
different data type.

Select one:
a. Using
b. ON
c. Inner Join
d. Outer Join
Clear my choice

Question 2
Answer saved
Marked out of 1.00

Flag question

Question text

Which of the following is not true about complex view when using UPDATE statement?

Select one:
a. You cannot modify data in a view if it contains group functions
b. You cannot modify data in a view if it contains column defined expression
c. All of the choices
d. You cannot modify data in a view if it contains a GROUP BY clause
Clear my choice

Question 3
Answer saved
Marked out of 1.00
Flag question

Question text

Which of the following are the two types of subquery. 

Select one:
a. Multiple row and one row subquery
b. Single row and multiple row subquery
c. Many row and single subquery
d. One and many row subquery
Clear my choice

Question 4
Answer saved
Marked out of 1.00

Flag question

Question text

Which of the following is the correct query that will create a report that will display the
following: FIRTSNAME, SALARY with additional 1000 in employees salary, rename this
column as BONUS, then get the DEPARTMENT_NAME and DEPARTMENT_ID. Join the
table using ON condition.

Select one:
a. SELECT FIRSTNAME, SALARY + 1000 AS BONUS, DEPARTMENT_NAME,
D.DEPARTMENT_ID
FROM EMPLOYEES E JOIN DEPARTMENTS D
ON E.DEPARTMENT_ID = D.DEPARTMENT_ID;
b. SELECT FIRSTNAME, SALARY + 1000 AS BONUS, DEPARTMENT_NAME,
DEPARTMENT_ID
FROM EMPLOYEES E JOIN DEPARTMENTS D
ON E.DEPARTMENT_ID = D.DEPARTMENT_ID;
c. SELECT FIRSTNAME, SALARY + 1000 AS BONUS, DEPARTMENT_NAME,
D.DEPARTMENT_ID
FROM EMPLOYEES E JOIN DEPARTMENTS D
ON DEPARTMENT_ID = DEPARTMENT_ID;
d. SELECT FIRSTNAME, SALARY + 1000 AS BONUS, DEPARTMENT_NAME,
D.DEPARTMENT_ID
FROM EMPLOYEES JOIN DEPARTMENTS
ON E.DEPARTMENT_ID = D.DEPARTMENT_ID;
Clear my choice

Question 5
Answer saved
Marked out of 1.00

Flag question

Question text

Which of the following is the correct example of modifying a view where salary manager_id
is null?

Select one:
a. CREATE OR REPLACE VIEW WORKERS (EMPLOYEE_ID, SURNAME, FIRSTNAME,
MANAGER_ID)
AS (EMPLOYEE_ID, LASTNAME, FIRSTNAME, MANAGER_ID
FROM EMPLOYEES
WHERE MANAGER_ID = NULL);
b. CREATE VIEW WORKERS (EMPLOYEE_ID, SURNAME, FIRSTNAME, MANAGER_ID)
AS (EMPLOYEE_ID, LASTNAME, FIRSTNAME, MANAGER_ID
FROM EMPLOYEES
WHERE MANAGER_ID IS NULL);
c. CREATE OR REPLACE VIEW WORKERS (EMPLOYEE_ID, SURNAME, FIRSTNAME,
MANAGER_ID)
AS (EMPLOYEE_ID, LASTNAME, FIRSTNAME, MANAGER_ID)
FROM EMPLOYEES
WHERE MANAGER_ID IS NULL);
d. CREATE OR REPLACE VIEW WORKERS (EMPLOYEE_ID, SURNAME, FIRSTNAME,
MANAGER_ID)
AS (EMPLOYEE_ID, LASTNAME AS "SURNAME", FIRSTNAME, MANAGER_ID
FROM EMPLOYEES
WHERE MANAGER_ID IS NULL);
Clear my choice

Question 6
Answer saved
Marked out of 1.00

Flag question

Question text

Refer to the table AUTHORS and COPY_AUTHORS (Note during the creation of view the
condition added is YR_PUBLISHED=2010). Supposed that the user update the
YR_PUBLISHED of book OS to from 2010 to 2010 as shown below what is/are the possible
output on both table and view?
UPDATE COPY_AUTHORS
SET YR_PUBLISHED = 2016
WHERE BOOK='OS';

Select one:
a. The record of book OS YR_PUBLISHED will be updated from 2010 to 2016 on
AUTHORS table only.
b. The record of book OS YR_PUBLISHED will be updated from 2010 to NULL both on
COPY_AUTHORS view and AUTHORS table.
c. The record of book OS YR_PUBLISHED will be updated from 2010 to 2016 on
COPY_AUTHORS view only.
d. The record of book OS will be removed in the COPY_AUTHORS view since its
YR_PUBLIHED is updated to 2016
Clear my choice

Question 7
Answer saved
Marked out of 1.00
Flag question

Question text

Supposed that table: Workers and Employees is consists of the following values.
What will be the output if the user uses this PL/SQL.
UPDATE EMPLOYEES
SET LASTNAME = (SELECT LASTNAME FROM WORKERS WHERE
LASTNAME=’Soriano’)
WHERE ID=105;

Select one:
a. The lastname of Cruz from Employees table will be set to NULL
b. The values of Employee with ID number 105 will be deleted
c. The lastname of Cruz from Employees table will be set to Soriano
d. All Workers lastname will be set to NULL
Clear my choice

Question 8
Answer saved
Marked out of 1.00
Flag question

Question text

Which of the following is the correct example of creating a view where LASTNAME ends
with letter S rename LASTNAME to SURNAME?

Select one:
a. CREATE VIEW WORKERS (EMPLOYEE_ID, SURNAME, FIRSTNAME)
AS (EMPLOYEE_ID, LASTNAME, FIRSTNAME
FROM EMPLOYEES
WHERE SALARY LASTNAME LIKE '%S');
b. CREATE VIEW WORKERS (EMPLOYEE_ID, LASTNAME, FIRSTNAME)
AS (EMPLOYEE_ID, LASTNAME, FIRSTNAME
FROM EMPLOYEES
WHERE SALARY LASTNAME LIKE '%S');
c. CREATE VIEW WORKERS (EMPLOYEE_ID, SURNAME, 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 AS "SURNAME", FIRSTNAME
FROM EMPLOYEES
WHERE SALARY LASTNAME LIKE '%S');
Clear my choice

Question 9
Answer saved
Marked out of 1.00

Flag question

Question text

SELECT EMPLOYEES.EMPLOYEE_ID,
EMPLOYEES.LASTNAME,EMPLOYEES.DEPARTMENT_ID,DEPARTMENTS.DEPARTME
NT_ID,DEPARTMENTS.LOCATION_ID
FROM EMPLOYEES JOIN DEPARTMENTS
USING (DEPARTMENT_ID);

Select one:
a. The given statement would case Cartesian or Cross Join
b. The given statement is not a valid join condition or is incorrect
c. The given statement is Outer Join
d. The given statement is an Equijoin
Clear my choice

Question 10
Answer saved
Marked out of 1.00

Flag question

Question text

Supposed that table: Workers and Employees is consists of the following values.
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 *
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)
SELECT ID, LASTNAME, DEPARTMENT
FROM WORKERS
WHERE STATUS = ‘Regular’;
d. INSERT INTO EMPLOYEES (ID, LASTNAME, DEPARTMENT)
VALUES (SELECT ID, LASTNAME, DEPARTMENT
FROM WORKERS
WHERE STATUS = ‘Regular’);
Clear my choice

80/100

Das könnte Ihnen auch gefallen