Oracle__15. Oracle 1Z0-051 Exam - Transactions Flashcards
What happens to a SAVEPOINT after a commit?
It is deleted
What happens with this series of statements in a transaction? DELETE * FROM table1 WHERE field = 1 SAVEPOINT test DELETE * FROM table1 WHERE field = 2 SAVEPOINT test ROLLBACK TO test;
The second SAVEPOINT over writes the first SAVEPOINT because the savepoint name is the same.
Savepoint can be used to rollback DML statement or DDL statements or both?
Only DML statements
What clause can be added to a select statement which will temporary lock records from other users for updating or deleting?
FOR UPDATE
Can you rollback a DELETE statement?
Yes
Can you rollback a TRUNCATE statement?
No
What does the following statement do? SAVEPOINT test;
create a savepoint in a transaction
What does the following statement do? ROLLBACK to test;
ROLLSBACK the SQL statements to the test SAVEPOINT.
Can you create more than one save point in a transaction?
Yes
What happens to a transaction with several SAVEPOINT when the command ROLLBACK is executed?
all transactions are rolled back.
What type of command will perform an automatic commit?
Any DDL statement.
What will happen with transactions when you exit SQL *Plus?
There will be an Auto Commit.
During a transaction but before the commit can the user view the results by executing a select statement?
Yes
During a transaction but before the commit can another user view the results by executing a select statement?
No
During a transaction but before the commit can another user make changes to the same rows that are pending a change?
No.The rows are locked by the first user.