Vidyalelo
Python · Q24

Database Connectivity with Python

Programming · Python · question 24

Q24

How can you rollback a transaction in the sqlite3 module?

A.
Using the commit() method
B.
Using the rollback() method
Answer
C.
By closing the connection
D.
By re-executing the transaction

Answer: Option B

Solution

Answer: Option B
Solution:
The rollback() method is used to undo changes made during a transaction in the sqlite3 module.