The SQL statements executed in a user session as follows:
Which two statements describe the consequence of issuing the ROLLBACK TO SAVE POINT a
command in the session? (Choose two.)
A.
Both the DELETE statements and the UPDATE statement are rolled back
B.
The rollback generates an error
C.
Only the DELETE statements are rolled back
D.
Only the seconds DELETE statement is rolled back
E.
No SQL statements are rolled back
this would generate an error
reason is that when we execute ‘commit’ statement then all the ‘savepoint’s which comes before it would be lost.
so when we will execute
ROLLBACK TO A;
It would give an error that Savepoint A does not exist.(as commit was executed)
SQL> create table product (
2 pcode number(2),
3 pname varchar2(10));
Table created.
SQL> insert into product values (1, ‘pen’);
1 row created.
SQL> insert into product values (2, ‘pencil’);
1 row created.
SQL> savepoint a;
Savepoint created.
SQL> update product set pcode = 10 where pcode = 1;
1 row updated.
SQL> savepoint b;
Savepoint created.
SQL> delete from product where pcode = 2;
1 row deleted.
SQL> commit;
Commit complete.
SQL> delete from product where pcode = 10;
1 row deleted.
SQL> ROLLBACK TO a;
ROLLBACK TO a
*
ERROR at line 1:
ORA-01086: savepoint ‘A’ never established
If B true : The rollback generates an error it is obviously that E- No SQL Statements are rolled back. My opinion only B. If it is an error nothing happen !