InterviewSolution
Saved Bookmarks
| 1. |
sum = sum + 10; |
|
Answer» The ROLLBACK undone all the changes since the last COMMIT or ROLLBACK. Let’s say the following is the INSERT in the table. At the end, execute the COMMIT command if you want to commit the transaction: INSERT INTO DEPTBUDGET (DEPTID,DEPTNAME,DEPTLOC) VALUES (1, 'Finance', 'NORTH'); INSERT INTO DEPTBUDGET (DEPTID,DEPTNAME,DEPTLOC) VALUES (2, 'Marketing', 'EAST'); INSERT INTO DEPTBUDGET (DEPTID,DEPTNAME,DEPTLOC) VALUES (3, 'Operations', 'WEST'); COMMIT;To rollback the transactions, use the ROOLBACK command. The changes you MADE to the database without COMMIT can be undone with ROLLBACK. The syntax: ROLLBACK [TO SAVEPOINT < name_of_savepoint>];Here, name_of_savepoint is the name of the savepoint. If savepoint is not USED, then simply use the “ROLLBACK” statement to rollback all the changes. ROLLBACK; |
|