問題文
A block inserts several rows and the developer places a COMMIT statement in the middle of the block. Which description of the relationship between a block and a transaction is correct?
選択肢
- A block and a transaction are the same unit, so the end of the block commits the changes and a COMMIT statement written in the middle of the block is rejected when the block is compiled.
- A block and a transaction are separate units, so one block can contain several transactions and one transaction can span several blocks that run one after the other in the same session.
- A block inherits the transaction of the caller and leaves it open, so a COMMIT statement inside a block takes effect after control has returned to the environment that has called the block.
- A block starts a transaction for each DML statement that it contains, so every insert is durable as soon as it runs and a rollback afterwards affects the last statement of the block.