Oracle认证考试

Mary has a view called EMP_DEPT_LOC_VU that was created based on the EMPLOYEES, DEPARTMENTS, and LOCATIONS tables. She granted SELECT privilege to Scott on this view. Which option enables Scott to eliminate the need to qualify the view with the name MARY

题目

Mary has a view called EMP_DEPT_LOC_VU that was created based on the EMPLOYEES, DEPARTMENTS, and LOCATIONS tables. She granted SELECT privilege to Scott on this view. Which option enables Scott to eliminate the need to qualify the view with the name MARY .EMP_DEP_LOC_VU each time the view is referenced?()

  • A、Scott can create a synonym for the EMP_DEPT_LOC_VU bus using the command: CREATE PRIVATE SYNONYM EDL_VU FOR mary.EMP DEPT_LOC_VU; then he can prefix the columns with this synonymn.
  • B、Scott can create a synonym for the EMP_DEPT_LOC_VU by using the command: CREATE SYNONYM EDL_VU FOR mary.EMP_DEPT_LOC_VU; then he can prefix the columns with this synonym.
  • C、Scott can create a synonym for the EMP_DEPT_LOC_VU by using the command: CREATE LOCAL SYNONYM EDL_VU FOR mary.EMP DEPT_LOC_VU; then he can prefix the columns with this synonym.
  • D、Scott can create a synonym for the EMP_DEPT_LOC_VU by using the command: CREATE SYNONYM EDL_VU ON mary(EMP_DEPT_LOC_VU); then he can prefix the columns with this synonym.
  • E、Scott cannot create a synonym because synonyms can be created only for tables.
  • F、Scott cannot create any synonym for Mary's view. Mary should create a private synonym for the view and grant SELECT privilege on that synonym to Scott.
如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

You need to create a view EMP_VU. The view should allow the users to manipulate the records of only the employees that are working for departments 10 or 20.Which SQL statement would you use to create the view EMP_VU?()

  • A、CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20);
  • B、CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH READ ONLY;
  • C、CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH CHECK OPTION;
  • D、CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20);
  • E、CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) NO UPDATE;

正确答案:C

第2题:

You created a view called EMP_DEPT_VU that contains three columns from the EMPLOYEES and DEPARTMENTS tables: EMPLOYEE_ID, EMPLOYEE_NAME AND DEPARTMENT_NAME. The DEPARTMENT_ID column of the EMPLOYEES table is the foreign key to the primary key DEPARTMENT_ID column of the DEPARTMENTS table. You want to modify the view by adding a fourth column, MANAGER_ID of NUMBER data type from the EMPLOYEES tables. How can you accomplish this task?()

  • A、ALTER VIEW EMP_dept_vu (ADD manger_id NUMBER);
  • B、MODIFY VIEW EMP_dept_vu (ADD manger_id NUMBER);
  • C、ALTER VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employee e, departments d WHERE e.department _ id = d.department_id;
  • D、MODIFY VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employees e, departments d WHERE e.department _ id = d.department_id;
  • E、CREATE OR REPLACE VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employees e, departments d WHERE e.department _ id = d.department_id;
  • F、You must remove the existing view first, and then run the CREATE VIEW command with a new column list to modify a view.

正确答案:E

第3题:

You are granted the CREATE VIEW privilege. What does this allow you to do? ()

A. Create a table view.

B. Create a view in any schema.

C. Create a view in your schema.

D. Create a sequence view in any schema.

E. Create a view that is accessible by everyone.

F. Create a view only of it is based on tables that you created.


参考答案:C

第4题:

Mary has a view called EMP_DEPT_LOC_VU that was created based on the EMPLOYEES, DEPARTMENTS, and LOCATIONS tables. She granted SELECT privilege to Scott on this view. Which option enables Scott to eliminate the need to qualify the view with the name MARY .EMP_DEP_LOC_VU each time the view is referenced?()

  • A、Scott can create a synonym for the EMP_DEPT_LOC_VU bus using the command:   CREATE PRIVATE SYNONYM EDL_VU   FOR mary.EMP DEPT_LOC_VU;   then he can prefix the columns with this synonymn.
  • B、Scott can create a synonym for the EMP_DEPT_LOC_VU by using the command:   CREATE SYNONYM EDL_VU   FOR mary.EMP_DEPT_LOC_VU;   then he can prefix the columns with this synonym.
  • C、Scott can create a synonym for the EMP_DEPT_LOC_VU by using the command:   CREATE LOCAL SYNONYM EDL_VU   FOR mary.EMP DEPT_LOC_VU;   then he can prefix the columns with this synonym.
  • D、Scott can create a synonym for the EMP_DEPT_LOC_VU by using the command:   CREATE SYNONYM EDL_VU   ON mary(EMP_DEPT_LOC_VU);   then he can prefix the columns with this synonym.
  • E、Scott cannot create a synonym because synonyms can be created only for tables.
  • F、Scott cannot create any synonym for Mary’s view. Mary should create a private ynonym for the view and grant SELECT privilege on that synonym to Scott.

正确答案:B

第5题:

You need to perform certain data manipulation operations through a view called EMP_DEPT_VU, which you previously created. You want to look at the definition of the view (the SELECT statement on which the view was created.) How do you obtain the definition of the view?()

  • A、Use the DESCRIBE command on the EMP_DEPT_VU view.
  • B、Use the DEFINE VIEW command on the EMP_DEPT_VU view.
  • C、Use the DESCRIBE VIEW command on the EMP_DEPT_VU view.
  • D、Query the USER_VIEWS data dictionary view to search for the EMP_DEPT_VU view.
  • E、Query the USER_SOURCE data dictionary view to search for the EMP_DEPT_VU view.
  • F、Query the USER_OBJECTS data dictionary view to search for the EMP_DEPT_VU view.

正确答案:D

第6题:

Examine the structure if the EMPLOYEES table: Column name Data Type Remarks EMPLOYEE_ID NUMBER NOT NULL, Primary Key EMP_NAME VARCHAR2(30) JOB_ID VARCHAR2(20) NOT NULL SAL NUMBER MGR_ID NUMBER References EMPLOYEE_ID column DEPARTMENT_ID NUMBER Foreign key to DEPARTMENT_ID column of the DEPARTMENTS table You need to create a view called EMP_VU that allows the user to insert rows through the view. Which SQL statement, when used to create the EMP_VU view, allows the user to insert rows? ()

  • A、CREATE VIEW emp_Vu AS SELECT employee_id, emp_name, department_id FROM employees WHERE mgr_id IN (102, 120);
  • B、CREATE VIEW emp_Vu AS SELECT employee_id, emp_name, job_id department_id FROM employees WHERE mgr_id IN (102, 120);
  • C、CREATE VIEW emp_Vu AS SELECT department_id, SUM(sal) TOTALSAL FROM employees WHERE mgr_id IN (102, 120) GROUP BY department_ id;
  • D、CREATE VIEW emp_Vu AS SELECT employee_id, emp_name, job_id, DISTINCT department_id FROM employees;

正确答案:B

第7题:

The HR user creates a view with this command:  SQL> CREATE VIEW emp_v AS SELECT * FROM scott.emp;  Now HR wants to grant the SELECT privilege on the EMP_V view to the JIM user.  Which statement is true in this scenario?()

  • A、HR can grant the privilege to JIM but without GRANT OPTION.
  • B、HR can grant the privilege to JIM because HR is the owner of the view.
  • C、SCOTT has to grant the SELECT privilege on the EMP table to JIM before this operation.
  • D、HR needs the SELECT privilege on the EMP table with GRANT OPTION from SCOTT for this operation.

正确答案:D

第8题:

You need to create a view EMP_VU. The view should allow the users to manipulate the records of only the employees that are working for departments 10 or 20. Which SQL statement would you use to create the view EMP_VU? ()

A. CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department _ id IN (10,20);

B. CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH READ ONLY;

C. CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH CHECK OPTION;

D. CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WITH department_id IN (10,20);

E. CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) NO UPDATE;


参考答案:C

第9题:

User Mary has a view called EMP_DEPT_LOC_VU that was created based on the EMPLOYEES, DEPARTMENTS, and LOCATIONS tables. She has the privilege to create a public synonym, and would like to create a synonym for this view that can be used by all users of the database.Which SQL statement can Mary use to accomplish that task?()

  • A、CREATE PUBLIC SYNONYM EDL_VU ON emp_dept_loc_vu
  • B、CREATE PUBLIC SYNONYM EDL:VU FOR mary (emp_dept_loc_vu);
  • C、CREATE PUBLIC SYNONYM EDL_VU FOR emp _dept_loc_vu;
  • D、CREATE SYNONYM EDL_VU ON emp_dept_loc_vu FOR EACH USER;
  • E、CREATE SYNONYM EDL_VU FOR EACH USER ON emp_dept_loc_vu
  • F、CREATE PUBLIC SYNONYM EDL_VU ON emp_dept_loc_vu FOR ALL USERS;

正确答案:C

第10题:

A database user SMITH tries to query the V$SESSION view and fails to access it as follows: SQL> connect smith/smith  Connected.  SQL> SELECT * FROM v$session;  SELECT * FROM v$session *  ERROR at line 1:  ORA-00942: table or view does not exist  Which are the two possible solutions to enable SMITH to query the data in V$SESSION()

  • A、granting SELECT privilege to SMITH on V$SESSION
  • B、granting SELECT privilege to SMITH on V_$SESSION
  • C、asking the user SMITH to run the catalog.sql script
  • D、granting SELECT privilege to SMITH on V$FIXED_TABLES
  • E、setting the O7_DICTIONARY_ACCESSIBILITY parameter to TRUE
  • F、creating a view based on V$SESSION and granting SELECT privilege to SMITH on the view that was created

正确答案:B,F

更多相关问题