OCP-1Z0-051 第45题 SEQUENCE(序列)的注意事项

来源:互联网 发布:守望先锋数据查询 编辑:程序博客网 时间:2024/06/06 10:48
一、原题
Which two statements are true about sequences created in a single instance database? (Choose two.)
A. The numbers generated by a sequence can be used only for one table.
B. DELETE <sequencename> would remove a sequence from the database.
C. CURRVAL is used to refer to the last sequence number that has been generated.
D. When the MAXVALUE limit for a sequence is reached, 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.

答案:CD

二、题目翻译
在单实例数据库中关于创建序列哪两句话是正确的?(选择两个)
A. 一个序列生成的值只能用于一个表。
B. DELETE <sequencename>可以从数据库里移除一个序列。
C. CURRVAL是指生成的最后的序列值。
D. 当达到序列的MAXVALUE限制时,你可以使用ALTER SEQUENCE语句增加MAXVALUE。
E. 当数据库实例非正常关闭,已经缓存到内存里但是没有被使用的序列数当实例再次打开后可以再次使用。

三、题目解析
A选项不正确,因为一个序列生成的值可以用于多个表。
B选项不正确,因为删除序列要用 DROP SEQUENCE sequencename。
E选项不正确,因为如果内存非正常关闭,缓存的数会丢失,不能再继续使用了。

0 0
原创粉丝点击