π Question
#1686
Given below are the SQL statements executed in a user session: CREATE TABLE product (pcode NUMBER(2), pnameVARCHAR2(10)); INSERT INTO product VALUES(1, 'pen'); INSERT INTO product VALUES (2,'penci'); SAVEPOINT a; UPDATE product SET pcode = 10 WHERE pcode = 1; SAVEPOINT b; DELETE FROM product WHERE pcode = 2; COMMIT; DELETE FROM product WHERE pcode=10; ROLLBACK TO SAVEPOINT a;
β
Correct Answer
A. No SQL statement would be rolled back
π‘
Explanation
The SAVEPOINT statement names and marks the current point in the processing of a transaction. With the ROLLBACK TO statement, savepoints undo parts of a transaction instead of the whole transaction.
β¨οΈ Press
A
B
C
D
to select