没有合适的资源?快使用搜索试试~ 我知道了~
Oracle OCP 12c 1z0-071-练习题 中文解析
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 135 浏览量
2022-06-28
15:29:01
上传
评论 1
收藏 1.19MB PDF 举报
温馨提示
试读
90页
Oracle OCP 12c 1z0-071-练习题 中文解析
资源推荐
资源详情
资源评论
更多IT认证资源 美河学习在线 www.eimhe.com
1 / 90
1z0-071
1. Examine the description of the EMPLOYEES table:
Name
Null?
Type
EMP_ID
NOT NULL
NUMBER
EMP_NAME
VARCHAR2(40)
DEPT_ID
NUMBER(2)
SALARY
NUMBER(8,2)
JOIN_DATE
DATE
Which query is valid?
A. SELECT dept_id, join_date, SUM(salary) FROM employees GROUP BY dept_id, join_date;
B. SELECT dept_id, join_date, SUM(salary) FROM employees GROUP BY dept_id;
C. SELECT dept_id, MAX(AVG(salary)) FROM employees GROUP BY dept_id;
D. SELECT dept_id, AVG(MAX(salary)) FROM employees GROUP BY dept_id;
Answer: A
解析:
纳入分组的字段必须全部出现在 GROUP BY 子句中;
在进行分组聚合操作时,不能对聚合函数进行嵌套使用。
2. Which three are true about the CREATE TABLE command? (with the version before 11g)
A. It can include the CREATE ... INDEX statement for creating an index to enforce the primary key
constraint.
B. The owner of the table should have space quotas available on the tablespace where the table is
defined.
C. It implicitly executes a commit.
D. It implicitly rolls back any pending transactions.
E. A user must have the CREATE ANY TABLE privilege to create tables.
F. The owner of the table must have the UNLIMITED TABLESPACE system privilege.
Answer: ABC
解析:
创建表的时候可以同时创建索引;
创建表(未开延迟段创建)时,需要用户对存储表的表空间有空间使用配额;
创建表 CREATE TABLE 中 DDL 语句,创建成功后自动执行 COMMIT,且对会话之前未提
交的事务一起提交;
用户需要有 create table 的权限即可创建表。
3. Which is the default column or columns for sorting output from compound queries using SET operators
such as INTERSECT in a SQL statement?
A. The first column in the last SELECT of the compound query
B. The first NUMBER column in the first SELECT of the compound query
C. The first VARCHAR2 column in the first SELECT of the compound query
D. The first column in the first SELECT of the compound query
E. The first NUMBER or VARCHAR2 column in the last SELECT of the compound query
Answer: DE
更多IT认证资源 美河学习在线 www.eimhe.com
2 / 90
解析: NVL 和 NVL2 中的参数数据类型必须一致,可使用函数进行转换。
4. Examine the description of the PRODUCT_DETAILS table:
Name
Null?
Type
PRODUCT_ID
NOT NULL
NUMBER(2)
PRODUCT_NAME
NOT NULL
VARCHAR2(25)
PRODUCT_PRICE
NUMBER(8,2)
EXPIRY_DATE
DATE
Which two statements are true?
A. PRODUCT_ID can be assigned the PRIMARY KEY constraint.
B. EXPIRY_DATE cannot be used in arithmetic expressions.
C. EXPIRY_DATE contains the SYSDATE by default if no date is assigned to it.
D. PRODUCT_PRICE can be used in an arithmetic expression even if it has no value stored it.
E. PRODUCT_PRICE contains the value zero by default if no value is assigned to it.
F. PRODUCT_NAME cannot contain duplicate values.
Answer: AD
解析:
非空字段可以可以用于主键列,但现有的数据存在重复时将会增加主键约束失败;
日期字段可以进行算术运算;
从表的定义上并为设置相关字段的默认值,不设置时默认为空;
Product_name 字段只包含非空约束,可以包含重复值。
5. The CUSTOMERS table has a CUST_LAST_NAME column of data type VARCHAR2. The table has two rows
whose CUST_LAST_NAME values are "Anderson" and "Ausson". Which query produces output for
CUST_LAST_NAME containing "Oder" for the first row and "Aus" for the Second?
A. SELECT REPLACE(REPLACE(cust_last_name, 'son', ''), 'An', 'O') FROM customers;
B. SELECT REPLACE(TRIM(TRAILING 'son' FROM cust_last_name), 'An', 'O') FROM customers;
C. SELECT INITCAP(REPLACE(TRIM('son' FROM cust_last_name), 'An', 'O')) FROM customers;
D. SELECT REPLACE(SUBSTR(cust_last_name, -3), 'An', 'O') FROM customers;
Answer: A
6. Which three statements are true about indexes and their administration in an Oracle database?
A. An invisible index is not maintained when DML (Data Manipulation Language) is performed on its
underlying table.
B. An index can be created as part of a CREATE TABLE statement.
C. A DROP INDEX statement always prevents updates to the table during the drop operation.
D. A unique and non-unique index can be created on the same table column.
E. A descending index is a type of function-based index.
F. It a query filters on an indexed column then it will always be used during execution of the query.
Answer: BDE
解析:
A)错误,不可见索引会自动随 DML 进行维护;
更多IT认证资源 美河学习在线 www.eimhe.com
3 / 90
B)正确,建表的时候就可以同时创建索引;
C)错误,执行 drop index 时会锁表,但可以加 online 选项允许 DML 操作;
D)正确,创建了索引的列可以做其它列一起再创建多列复合索引;
E)正确,ORACLE 官方把降序索引归类为函数索引;
F)错误,创建了索引,在查询的时候不一定都会用到,涉及的因素很多。
7. Which three are true about granting object privilege on tables, views and sequences?
A. UPDATE can be granted only on tables and views.
B. DELETE can be granted on tables, views and sequences.
C. REFERENCES can be granted only on tables and views.
D. INSERT can be granted on tables, views and sequences.
E. SELECT can be granted only on tables and views.
F. ALTER can be granted only on tables and sequences.
Answer: ACF
解析:序列没有 insert 和 delete 权限。
8. The EMPLOYEES table contains columns EMP_ID of data type NUMBER and HIRE_DATE of data type DATE.
You want to display the date of the first Monday after the completion of six months since hiring. The
NLS_TERRITORY parameter is set to AMERICA in the session and, therefore, Sunday is the first day of the
week.
Which query can be used?
A. SELECT emp_id, NEXT_DAY(ADD_MONTHS(hire_date, 6), 'Monday') FROM employees;
B. SELECT emp_id, ADD_MONTHS(hire_date, 6), NEXT_DAY('Monday') FROM employees;
C. SELECT emp_id, NEXT_DAY(MONTHS_BETWEEN(hire_date, SYSDATE), 6) FROM employees;
D. SELECT emp_id, NEXT_DAY(ADD_MONTHS(hire_date, 6), 1) FROM employees;
Answer: A
解析:
使用 next_day 函数时,注意 NLS_TERRITORY 的设置,如果是 china,就不能使用 Monday,
需要用中文描述’星期一’.
为了兼容性,推荐使用数字 1-7,1 表示星期天,2 表示星期一,以此类推。
9. Which three statements are true about views in an Oracle database?
A. A SELECT statement cannot contain a WHERE clause when querying a view containing a WHERE clause
in its defining query.
B. Rows inserted into a table using a view are retained in the table if the view is dropped.
C. Views can join tables only if they belong to the same schema.
D. Views have no segment.
E. Views have no object number.
F. A view can be created that refers to a non-existent table in its defining query.
Answer: BDF
解析:
针对视图的查询,可以添加任意有效的 where 条件。
针对视图的插入,最终数据插入到基表中,不受视图删除的影响。
更多IT认证资源 美河学习在线 www.eimhe.com
4 / 90
视图与能与任何有权限访问的基表进行连接查询,不一定非要同一个模式下。
视图只是保留针对基表查询的定义,不存储表的数据行,因此不会分配物理段。
视图也作为数据库对象进行管理。
视图创建时通过 FORCE 参数,允许基表不存在时也能创建视图。Create force view v_test
as select * from abcdefg;
10. Which two statements are true about Oracle synonyms?
A. A synonym can have a synonym.
B. All private synonym names must be unique in the database.
C. Any user can create a public synonym.
D. A synonym can be created on an object in a package.
E. A synonym has an object number.
Answer: AE
解析:
可以对已经存在的同义词再创建同义词;
在同一个模式下,同义词名称不能重复;
创建公有同义词需要有 create public synonym 的权限;
不能为包的对象创建同义词,包是可以创建同义词的;
同义词也是数据库对象。
11. Which two statements are true about a self join?
A. The join key column must have an index.
B. It can be a left outer join.
C. It must be a full outer join.
D. It can be an inner join.
E. It must be an equal join.
Answer: BD
解析:表的自连接可以是任意一种多表连接方式。
12. Which three statements are true about dropping and unused columns in an Oracle database?
A. A PRIMARY KEY column referenced by another column as a FOREIGN KEY can be dropped if using the
CASCADE option.
B. A DROP COLUMN command can be rolled back.
C. An UNUSED column’s space is reclaimed automatically when the block containing that column is next
queried.
D. An UNUSED column’s space is reclaimed automatically when the row containing that column is next
queried.
E. Partition key columns cannot be dropped.
F. A column that is set to UNUSED still counts towards the limit of 1000 columns per table.
Answer: AEF
解析:
更多IT认证资源 美河学习在线 www.eimhe.com
5 / 90
用于其它表外键约束的主键列在设置为 unused 时需要加 cascade;
DROP COLUMN 是 DDL 语句,无法手动 rollback;
置为 unused 的列不能自动回收空间的,除非 drop 掉;
用于分区键的列是不可被删除的;
同一个表中设置 unused 的列不能超过 1000 个。
13. Examine this query:
SELECT TRUNC(ROUND(156.00, -2), -1) FROM dual;
What is the result?
A. 16
B. 160
C. 150
D. 200
E. 100
Answer: D
14. Examine this SQL statement:
UPDATE orders o
SET customer_name = (
SELECT cust_last_name
FROM customers
WHERE customer_id = o.customer_id
);
Which two are true?
A. The subquery is executed before the UPDATE statement is executed.
B. All existing rows in the ORDERS table are updated.
C. The subquery is executed for every updated row in the ORDERS table.
D. The UPDATE statement executes successfully even if the subquery selects multiple rows.
E. The subquery is not a correlated subquery.
Answer: CD
解析:
关联子查询从主查询开始执行;
满足条件的行才会被更新,而不是所有存在的行;
15. Examine this information:
Name
Null?
Type
PRODUCT_ID
NOT NULL
NUMBER(2)
PRODUCT_NAME
VARCHAR2(10)
UNIT_PRICE
NUMBER(3)
SURCHARGE
VARCHAR2(2)
EXPIRY_DATE
DATE
DELIVERY_DATE
DATE
剩余89页未读,继续阅读
资源评论
CodeGolang
- 粉丝: 55
- 资源: 1088
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- ### 词向量的介绍、使用技巧和优缺点的文章
- 基于STM32F103CBT6单片机GC65+MP2625+CC1101 GPSTrack模块板硬件(原理图+PCB)工程文件
- ### 通道处理过程模拟概念、优缺点和使用技巧
- ### MyBatis动态SQL介绍说明、使用技巧和优缺点
- 上传下载仿163网盘无刷新文件上传 for Jsp-fileupload-jsp.rar
- VMware Workstation业界非常稳定且安全的桌面虚拟机软件-计算机上运行多个操作系统,支持Windows、DOS等
- 基于STM8L101F3P6单片机+LY2508A33P+CC1100遥控器硬件(原理图+PCB)工程文件.zip
- 上传下载WAP图铃下载系统-unimg.rar
- YTX-0.1.0-Win
- 上传下载ExtJS 2.2 开源网络硬盘系统-dogdisk.rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功