KnowledgeBoat Logo
|

Computer Science

Differentiate between commit() and rollback() statements.

Python MySQL

1 Like

Answer

commit() statementrollback() statement
The commit() method is used to permanently save the changes made during a transaction to the database.The rollback() method is used to undo or revert the changes made by a transaction.
The syntax is: connection.commit().The syntax is: connection.rollback().

Answered By

3 Likes


Related Questions