SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Statements
HP NonStop SQL/MX Reference Manual540440-003
2-25
Considerations for ALTER TRIGGER
Considerations for ALTER TRIGGER
ENABLE ALL enables all triggers defined on table-name.
DISABLE ALL disables all triggers defined on table-name.
Authorization and Availability Requirements
To alter a trigger, you must own its schema or be the super ID. Only the super ID can
use ALTER TRIGGER DISABLE ALL or ALTER TRIGGER ENABLE ALL.
BEGIN WORK Statement
The BEGIN WORK statement enables you to start a transaction explicitly—where the
transaction consists of the set of operations defined by the sequence of SQL
statements that begins immediately after BEGIN WORK and ends with the next
COMMIT or ROLLBACK statement. See Transaction Management on page 1-12.
BEGIN WORK is an SQL/MX extension.
Considerations for BEGIN WORK
Effect on Audited Tables
A user-defined transaction groups together a set of operations on audited tables so
that changes made by the operations can be committed (with the COMMIT statement)
or rolled back (with the ROLLBACK statement) as a unit. That is, the sequence of SQL
statements that make up the transaction either completely executes or has no effect.
Effect on Nonaudited Tables
Transactions do not protect nonaudited tables. The BEGIN WORK statement has no
effect on nonaudited tables.
MXCI Examples of BEGIN WORK
Group three separate statements—two INSERT statements and an UPDATE
statement—that update the database within a single transaction:
--- This statement initiates a transaction.
BEGIN WORK;
--- SQL operation complete.
INSERT INTO sales.orders VALUES (125, DATE '1998-03-23',
DATE '1998-03-30', 75, 7654);
--- 1 row(s) inserted.
BEGIN WORK