COMMIT

Name

COMMIT  --  Commits the current transaction

Synopsis

COMMIT [ WORK | TRANSACTION ]
  

Inputs

WORK

Optional keyword. Has no effect.

TRANSACTION

Optional keyword. Has no effect.

Outputs

COMMIT

Message returned if the transaction is successfully committed.

NOTICE: COMMIT: no transaction in progress

Message returned if there is no transaction in progress.

Description

COMMIT commits the current transaction. All changes made by the transaction become visible to others and are guaranteed to be durable if a crash occurs.

Notes

Use ROLLBACK to abort a transaction.

Usage

To make all changes permanent:
CREATE TABLE POINT_TBL2(f1 point);
INSERT INTO POINT_TBL2(f1) VALUES ('(0.0,0.0)');
INSERT INTO POINT_TBL2(f1) VALUES ('(-10.0,0.0)');
INSERT INTO POINT_TBL2(f1) VALUES ('(-3.0,4.0)');
INSERT INTO POINT_TBL2(f1) VALUES ('(5.1, 34.5)');
INSERT INTO POINT_TBL2(f1) VALUES ('(-5.0,-12.0)');
INSERT INTO POINT_TBL2(f1) VALUES ('(7.0,-3.0)');
BEGIN WORK;
/* DECLARE the CURSOR */
DECLARE cursor1 CURSOR FOR SELECT * FROM POINT_TBL2;
/* FETCH IN CURSOR */
FETCH FORWARD 3 IN cursor1;
MOVE BACKWARD 5 IN cursor1;
/* CLOSE the CURSOR */
CLOSE cursor1;
COMMIT WORK;
   

Compatibility

SQL92

SQL92 only specifies the two forms COMMIT and COMMIT WORK.