SQL$HELP_OLD72.HLB  —  DECLARE  TRANSACTION
    Specifies the characteristics for a default transaction. A
    transaction is a group of statements whose changes can be made
    permanent or undone only as a unit.

    A transaction ends with a COMMIT or ROLLBACK statement. If you
    end the transaction with the COMMIT statement, all changes made
    to the database by the statements are made permanent. If you end
    the transaction with the ROLLBACK statement, the statements do
    not take effect.

    The characteristics specified in a DECLARE TRANSACTION statement
    affect all transactions (except those started by the SET
    TRANSACTION or START TRANSACTION statement) until you issue
    another DECLARE TRANSACTION statement. The characteristics
    specified in a SET TRANSACTION or START TRANSACTION statement
    affect only that transaction.

    A DECLARE TRANSACTION statement does not start a transaction.
    The declarations made in a DECLARE TRANSACTION statement do not
    take effect until SQL starts a new transaction. SQL starts a new
    transaction with the first executable data manipulation or data
    definition statement following a DECLARE TRANSACTION, COMMIT,
    or ROLLBACK statement. In the latter case (following a COMMIT or
    ROLLBACK statement), SQL applies the transaction characteristics
    you declared for the transaction that just ended to the next one
    you start.

    In addition to the DECLARE TRANSACTION statement, you can specify
    the characteristics of a transaction in one of two ways:

    o  If you specify the SET TRANSACTION or START TRANSACTION
       statement, the declarations in the statement take effect
       immediately and SQL starts a new transaction.

    o  You can retrieve and update data without declaring or
       setting a transaction explicitly. If you omit the DECLARE
       TRANSACTION, SET TRANSACTION or START TRANSACTION statements,
       SQL automatically starts a transaction (using the read/write
       option) with the first executable data manipulation or data
       definition statement following a COMMIT or ROLLBACK statement.

    See the Oracle Rdb SQL Reference Manual for examples of when you
    would want to use the DECLARE TRANSACTION statement instead of
    the SET TRANSACTION or START TRANSACTION statement.

    You can specify many options with the DECLARE TRANSACTION
    statement, including:

    o  A transaction mode (READ ONLY/READ WRITE/BATCH UPDATE)

    o  A lock specification clause (RESERVING options)

    o  A wait mode (WAIT/NOWAIT)

    o  An isolation level

    o  A constraint evaluation specification clause

    o  Multiple sets of all the preceding options for each database
       involved in the transaction (ON clause)
Additional Information: explode extract
Environment Format Arguments Defaults Examples
Close Help