How to use comand "COMMIT"and "ROLLBACK" in a transacsion?

Showing Answers 1 - 7 of 7 Answers

Mainak Aich

  • Mar 2nd, 2006
 

For commit simply run the command : commit;it will save all the operation you have performed on the database.After commit you can't go back to previous state.A rollback is used to go back to previous commit.That is if you made some change on database using DML and if you want to go back to the previous state from where you have first started changing then use the command : rollback;It should be kept in mind that after every DDL command there is a autocommit by oracle server.A rollback can't change it.Suppose you create a table and after that if you execute rollback then nothing will happen.

  Was this answer useful?  Yes

narendra kumar

  • Dec 6th, 2006
 

COMMIT:it is used to make the manipulations ENABLE permanently on the table where as ROLLBACK is used to DISABLE the effect of the queries(which were typed a bit above it) on the table. one ROLLBACK statement is sufficient to disable the effect of all the previous dml operations and it is in the same case with COMMIT also.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions