oracle: OCA-047-题解与实验(2)
2011-12-09 15:54
375 查看
题目:
![](http://hi.csdn.net/attachment/201112/9/0_1323415976CVaH.gif)
逐条分析吧:
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.通过他的描述即可判断。在数据库里同义词就相当于表的别名的功能,用一个别名来代表一个表。如:
创建synonym的语句格式是:
B:错误,应该是sys用户,而不是system用户;
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. 用户查询时只会列出用户可以访问的数据字典行;
![](http://hi.csdn.net/attachment/201112/9/0_1323415976CVaH.gif)
逐条分析吧:
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. 用户查询时只会列出用户可以访问的数据字典行;
相关文章推荐
- oracle: OCA-047-题解与实验(12)--Create table的常见写法
- oracle: OCA-047-题解与实验(9)--SQL语句中COUNT和NLV的用法
- oracle: OCA-047-题解与实验(1)--merge的用法
- oracle: OCA-047-题解与实验(5) --start with 与 connect by的用法
- oracle: OCA-047-题解与实验(7)--REGEXP_REPLACE的用法
- oracle: OCA-047-题解与实验(3)--insert语句注意事项
- oracle: OCA-047-题解与实验(4)
- oracle: OCA-047-题解与实验(8)--CUBE和ROLLUP的用法
- oracle: OCA-047-题解与实验(10)--SQL语句中to_date的用法
- oracle: OCA-047-题解与实验(11)--SQL语句中sequence的用法
- oracle: OCA-047-题解与实验(6)--session_privs的内容
- oracle: OCA-042-题解与实验(1)
- oracle: ocp题解与实验(4/205)
- oracle: ocp题解与实验(7/205) .
- oracle: ocp题解与实验(11/205) .
- oracle: ocp题解与实验(12 & 13/205)
- oracle: ocp题解与实验(14/205)
- oracle: ocp题解与实验(1/205)
- oracle: ocp题解与实验(3/205)
- oracle: ocp题解与实验(8&9/205)