Committing Work in a SQL Script
Go Up to Using SQL Scripts
Changes to the database from data definition (DDL) statements—for example,
ALTER statements—are automatically committed by default. This means that other users of the database see changes as soon as each DDL statement is executed. To turn off automatic commit of DDL in a script, use
SET AUTODDL OFF, or set it in the Query Options dialog. See Using InterBase Manager to Start and Stop InterBase for more information.
- Note: When creating tables and other database objects with
AUTODDL OFF, it is good practice to put a
COMMITstatement in the SQL script after each
CREATEstatement or group of related statements. This ensures that other users of the database see the objects immediately.
Changes made to the database by data manipulation (DML) statements—for example
UPDATE—are not permanent until they are committed. Commit changes in a script with
COMMIT. To undo all database changes since the last
ROLLBACK. For the full syntax of
ROLLBACK, see the Language Reference book.