2.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 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 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。
解析:Oracle的序列
伪列currval获取当前序列的值,调用currval,必须先调用nextval的值。 A正确
使用DROP sequence_name删除序列 B错误
序列是共享的对象,可以用于多个表 C错误
当序列到达maxvalue,可以使用ALTER SEQUENCE xxx修改序列的最大值 D正确
当数据库被异常关闭后,序列的缓存的数字但没有使用重启数据库不能使用缓存的序列的值 E错误
Answer:AD

本文介绍了Oracle数据库中序列的相关知识,包括CURRVAL和NEXTVAL的使用、序列的删除、序列值的范围调整以及序列在数据库异常关闭后的处理。重点讨论了序列的创建和管理,以及序列在多表中的应用。
177

被折叠的 条评论
为什么被折叠?



