Commit & RollBack Operation in Python


COMMIT

Commit is the operation, which gives a green signal to database to finalize the changes, and after this operation, no change can be reverted back.

Here is a simple example to call commit method.

db.commit()

ROLLBACK

If you are not satisfied with one or more of the changes and you want to revert back those changes completely, then use rollback() method.

Here is a simple example to call rollback() method.

db.rollback()

Updated on: 31-Jan-2020

461 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements