Contents Index Grouping changes into transactions Canceling changes

ASA Getting Started
  Updating the Database
    Grouping changes into transactions

Making changes permanent


The COMMIT statement makes all changes permanent.

You should use the COMMIT statement after groups of statements that make sense together. For example, if you want to transfer money from one customer's account to another, you should add money to one customer's account, then delete it from the other's, and then commit, since in this case it does not make sense to leave your database with less or more money than it started with.

You can instruct Adaptive Server Anywhere to commit your changes automatically by setting the AUTO_COMMIT option to ON. This is an Interactive SQL option. When AUTO_COMMIT is set to ON, Adaptive Server Anywhere must update the database after every insert, update, and delete statement you make to it. This can slow down performance considerably. Therefore, it is a good idea to leave the AUTO_COMMIT option set to OFF.

Use COMMIT with care 
When trying the examples in this tutorial, be careful not to COMMIT any changes until you are sure that you want to change the database permanently.

For more information about Interactive SQL options, see Interactive SQL options.


Contents Index Grouping changes into transactions Canceling changes