题目:
逐条分析吧:
A:正确,USER_SYNONYMS describes the private synonyms (synonyms owned by the current user). Its columns (except for OWNER) are the same as those in ALL_SYNONYMS.通过他的描述即可判断。在数据库里同义词就相当于表的别名的功能,用一个别名来代表一个表。如:
SQL> create or replace synonym syn1 for jobs;
Synonym created
SQL> select * from user_synonyms;
SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK
------------- ------------ ----------- -------------
SYN1 HR JOBS
SQL> desc user_synonyms;
Name Type Nullable Default Comments
------------ ------------- -------- ------- ---------------------------------------------
SYNONYM_NAME VARCHAR2(30) Name of the synonym
TABLE_OWNER VARCHAR2(30) Y Owner of the object referenced by the synonym
TABLE_NAME VARCHAR2(30) Name of the object referenced by the synonym
DB_LINK VARCHAR2(128) Y Database link referenced in a remote synonym
SQL> select * from syn1;
JOB_ID JOB_TITLE MIN_SALARY MAX_SALARY
---------- ----------------------------------- ---------- ----------
AD_PRES President 20080 40000
AD_VP Administration Vice President 15000 30000
AD_ASST Administration Assistant 3000 6000
FI_MGR Finance Manager 8200 16000
创建synonym的语句格式是:
CREATE [ OR REPLACE ] [ PUBLIC ] SYNONYM
[ schema. ] synonym
FOR [ schema. ] object [ @ dblink ] ;
B:错误,应该是sys用户,而不是system用户;
SQL> select count(*) from dba_tables where owner='SYSTEM';
COUNT(*)
----------
156
SQL> select count(*) from dba_tables where owner='SYS';
COUNT(*)
----------
954
SQL>
C:错误,动态性能视图并不是全部都开放给所有用户;
D:错误,不是created by the user only 而是owned by the user only,原文档描述是:USER_OBJECTS describes all objects owned by the current user. Its columns are the same as those in ALL_OBJECTS;
E:正确,DICTIONARY contains descriptions of data dictionary tables and views. 用户查询时只会列出用户可以访问的数据字典行;