DB2 Transaction Control Language

DB2 DELETE Statement Data Control Language

Advertisements


Transaction control language is used to control the transactions performed on the database.

TCL can save or revoke the transactions applied on the database from SYNC point.

SYNC point is nothing but where the COMMIT or ROLLBACK executed.

TCL have below two statements


  1. COMMIT
  2. ROLLBACK

COMMIT:


COMMIT is used to save all transactions performed on database from the SYNC point.

If the COMMIT performed then the changes performed from the SYNC point will be made as permanent.

COMMIT can also closes all the open cursors at the point of COMMIT executes except the cursors WITH HOLD.


Syntax:


EXEC SQL
	COMMIT
END-EXEC.


ROLL BACK:


ROLLBACK is used to revert back all transactions performed on database from the SYNC point.

If the ROLLBACK performed then the changes performed from the SYNC point will be reverted back.


Syntax:


EXEC SQL
	ROLLBACK
END-EXEC.


DB2 DELETE Statement Data Control Language

Advertisements