answersLogoWhite

0

Rollback:

This is used for undoing the work done in the current transaction. This command also releases the locks if any hold by the current transaction. The command used in SQL for this is simply:

ROLLBACK;

Savepoint:

This is used for identifying a point in the transaction to which a programmer can later roll back. That is it is possible for the programmer to divide a big transaction into subsections each having a savepoint defined in it. The command used in SQL for this is simply:

SAVEPOINT savepointname;

For example:

UPDATE…..

DELETE….

SAVEPOINT e1;

INSERT….

UPDATE….

SAVEPOINT e2;

……

It is also possible to define savepoint and rollback together so that programmer can achieve rollback of part o a transaction. Say for instance in the above

ROLLBACK TO SAVEPOINT e2;

This results in the rollback of all statements after savepoint e2

Commit:

This is used to end the transaction and make the changes permanent. When commit is performed all save points are erased and transaction locks are released. In other words commit ends a transaction and marks the beginning of a new transaction. The command used in SQL for this is simply:

COMMIT;

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

Difference between DDl DMl statement explain how savepoint work?

The differences between them you can get from, http://arjudba.blogspot.com/2008/04/what-are-difference-between-ddl-dml-and.html


What is the difference between fly back and rollback fur?

Fly back fur, when brought against the grain, goes right back to its normal self, while rollback sort of rolls back to its natural position. NOW, enjoy your MUNCHIES!


Illustrate the difference between aromaticity and antiaromaticity with appropriate examples?

Illustrate the difference between aromaticity and antiaromaticity with appropriate examples?


Difference between operation management and production management with examples?

the difference between production management and operation management?


What is difference between Smoke and sanity testing with examples?

htyh


What is the difference between through and by with examples?

do u chat by mobile


What is the difference between NFA and DFA with examples for each?

aop


Difference between marketing orientation and production orientation with examples?

marketing orientation


What is the difference between drop and truncate in dbms?

even though both these commands are related to the structure of the table...,we can regain the data when we use use drop command by use of rollback command but its not possible in the case of truncate command.


Give examples od differences between interpersonal and business communication?

what is the difference between Interpersonal and Business Communication?


Non economic activities and its examples?

What is the difference between economic and non economic activities.?


What is the difference between a program and algorithm give examples in each?

Check your text book. The answer is there