⇧
vadnica-logo
My Services About the Project Telegram O meni O meni

Confirming Changes with the commit() Method

The commit() method is used to complete a transaction and permanently save all changes made since beginTransaction() was called. When you call this method, the database updates its state, and the changes become visible to all other users. If you do not confirm the transaction using this method, all changes will be automatically undone (rolled back) at the end of the script.

EXAMPLE
RESULT
The result will be displayed here...

Practical Application: We only call the commit method at the very end when we are certain that all SQL commands (e.g., transferring money from one account to another) executed without any errors. Check the process at home by following these steps: