OCP問題解析_007:シーケンス

1502 ワード

sequenceの設計は一意性を保つことができますが、連続インスタンスができません.sequenceブレーク、トランザクションロールバック、sequenceブレーク、同時アクセス、sequenceブレーク可能......呼び出しseq_name.Currvalは、このセッションでシーケンスが呼び出されたseq_を返します.name.Currvalの前の最後の呼び出しseq_name.nextvalの戻り値は、seq_を個別に呼び出すname.Currvalの場合、その前にセッションでseq_が呼び出されていることを確認する必要があります.name.nextval(初期化作用があるようです)seq_name.currval、seq_name.nextvalが同じSQL文に表示されたら、seq_を先に実行します.name.nextval,seq_を再実行するname.currval
したがって、両者の戻り値は等しいはずです.
Q: 23 Which two statements about sequences are true? (Choose two.)

A. You use a NEXTVAL pseudo column to look at the next possible value that would be generated from a 
sequence, without actually retrieving the value. 

B. You use a CURRVAL pseudo column to look at the current value just generated from a sequence, without 
affecting the further values to be generated from the sequence. 

C. You use a NEXTVAL pseudo column to obtain the next possible value from a sequence by actually 
retrieving the value from the sequence. 

D. You use a CURRVAL pseudo column to generate a value from a sequence that would be used for a 
specified database column. 

E. If a sequence starting from a value 100 and incremented by 1 is used by more than one application, then all 
of these applications could have a value of 105 assigned to their column whose value is being generated by the sequence. 

F. You use a REUSE clause when creating a sequence to restart the sequence once it generates the maximum 
value defined for the sequence. 

Answer: B, C