Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

SQLPLUS 11. When would an index decrease the speed of a query? a. The table is s

ID: 3916440 • Letter: S

Question

SQLPLUS

11. When would an index decrease the speed of a query?  

a. The table is small.  

b. The column is used in the WHERE clause.  

c. The column contains a wide range of values.  

d. The column contains a large number of null values.  

12. Which command deletes the data in the EMPLOYEE table, its table structure, and any  

integrity constraints that reference the tables' primary and unique keys?  

a. DROP employee;  

b. DROP TABLE employee CASCADE CONSTRAINTS;  

c. TRUNCATE employee; ALTER TABLE employee; DROP PRIMARY KEY CASCADE;  

d. DELETE * FROM employee; ALTER TABLE employee; DROP PRIMARY KEY CASCADE;  

13. Examine the EMP_HIST_V view:  

EMP_HIST_V                  Name Type  

?????????????????????????????? ??????????????????????  

EMPLOYEE_ID   NUMBER(6)  

NAME   VARCHAR2(15)  

JOB   VARCHAR2(9)  

MANAGER   NUMBER(4)  

DATE_HIRED   DATE  

SALARY   NUMBER(7,2)  

BONUS    NUMBER(7,2)  

DEPARTMENT_ID   NUMBER(2)  

Which two statements will NOT successfully query the EMP_HIST_V view? (Choose two.)  

a. SELECT *  

FROM emp_hist_v;  

b. SELECT *  

FROM VIEW emp_hist_v;

c. SELECT COUNT(*)  

FROM emp_hist_v;  

d. SELECT COUNT(*)  

FROM VIEW emp_hist_v;  

14. How does the USER_TABLES dictionary view differ from the ALL_TABLES data dictionary  

view?  

a. ALL_TABLES will display only the tables owned by the user.  

b. USER_TABLES will display only the tables owned by the user.  

c. ALL_TABLES will display only the tables on which the user has SELECT privileges.  

d. USER_TABLES will display all the tables on which the user has SELECT privileges.  

15. Which statement will you use to display only the name, view definition, and the length of the view  

definition of the EMPLOYEE_HIST view?  

a. SELECT *  

FROM user_views  

WHERE view_name = 'EMPLOYEE_HIST';  

b. SELECT view_name, text, text_length  

FROM user_views  

WHERE view_name = 'EMPLOYEE_HIST';  

c. SELECT view_name, text, text_length  

FROM VIEW user_objects  

WHERE view_name = 'EMPLOYEE_HIST  

d. SELECT VIEW view_name, text, text_length  

FROM all_objects  

WHERE view_name = 'EMPLOYEE_HIST';

Explanation / Answer

Answer 11:

Option A
Answer 12:

Option B

Answer 13:

Option B and D

Answer 14:

Option B

Answer 15:

Option B