OCP-1Z0-新051-61题版本-21

该博客讨论了在单实例数据库中创建的序列的两个正确陈述:A. CURRVAL 用于引用已生成的最后一个序列号;D. 当序列达到MAXVALUE限制时,可以通过ALTER SEQUENCE语句增加MAXVALUE限制。还提到了序列可能产生的间隙、系统崩溃对序列的影响以及如何修改和删除序列。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

QUESTION NO: 21

Which two statements are true about sequences created in a single instance database? (Choose two.)

A. CURRVAL is used to refer to the last sequence number that has been generated

B. DELETE <sequencename> would remove a sequence from the database

C. The numbers generated by a sequence can be used only for one table

D. When the MAXVALUE limit for a sequence isreached, you can increase the MAXVALUE limit by using the ALTER SEQUENCE statement

E. When a database instance shuts down abnormally, the sequence numbers that have been cached but not used would be available once again when the database instance is restarted

Answer: A,D

答案解析:

参考:45:http://blog.csdn.net/rlhua/article/details/12780395

Explanation:

Gaps in the Sequence

Although sequence generators issue sequential numbers without gaps, this action occurs

independent of a commit or rollback. Therefore, if you roll back a statement containing a

sequence, the number is lost.

Oracle 1z0-051 Exam

"Pass Any Exam. Any Time." - 100% Pass Guarantee 18

Another event that can cause gaps in the sequence is a system crash. If the sequence caches

values in memory, those values are lost if the system crashes.

Because sequences are not tied directly to tables, the same sequence can be used for multiple

tables.

However, if you do so, each table can contain gaps in the sequential numbers.

Modifying a Sequence

If you reach the MAXVALUE limit for your sequence, no additional values from the sequence are

allocated and you will receive an error indicating that the sequence exceeds the MAXVALUE. To

continue to use the sequence, you can modify it by using the ALTER SEQUENCE statement

To remove a sequence, use the DROP statement:

DROP SEQUENCE dept_deptid_seq;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值