問題文
A block assigns a sequence value to a local variable, and a later statement in the same block names that same sequence again. The block then rolls back. Which description of what happens to the sequence is correct?
選択肢
- The engine keeps the pseudocolumn cached for the transaction, so the second reference returns the prior number, and the advance is applied when the transaction commits.
- The engine evaluates the pseudocolumn once for the whole block, so the second reference returns the same number, and the rollback puts the sequence back to where it stood before.
- The engine evaluates every occurrence of the pseudocolumn, so the second reference advances the sequence again, and the advance stands even after the block has been rolled back.
- The engine rejects the pseudocolumn inside a PL/SQL expression, so the value must be read with a query on a table, and the advance happens when the block reaches its end.