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 can have two statements

	1. COMMIT
	2. ROLLBACK

1. 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.

2. 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.


If any questions on the above, post your queries on DB2 Discussion forum


DB2 DELETE Statement Data Control Language

Advertisements