One, roll back to the retention point
- Use the savepoint statement to create a savepoint in the current transaction.
- Use the ROLLBACK to savepoint statement to roll back to the saved point that was created.
Second, the data state before committing or rolling back
- The state of the data before the change can be restored.
- Other users cannot see changes made by the current user until the current user ends the transaction.
- The rows involved in the DML statement are locked and cannot be manipulated by other users.
Third, the status of the data after submission
- Changes to the data have been saved in the database.
- The data before the change has been lost.
- All users can see the results.
- The lock is released and other users can manipulate the data involved.
- All save points are freed.
Iv. Examples of transactions
- Scott user updates the Employees table without committing (commit)
- Then the system user wants to query for updates to get the Employees table
Select * from for update; --but the database is not responding at this time
- You must wait until the Scott user commits the Employees table, and this SQL statement executes.
oracle--Control Transactions