0% found this document useful (0 votes)
24 views

TCL_Command_In_SQL

TCL (Transaction Control Language) is a subset of SQL commands used to manage changes made by DML operations, ensuring data integrity and consistency in database transactions. Key TCL commands include COMMIT, which saves changes, ROLLBACK, which undoes changes, and SAVEPOINT, which allows for partial rollbacks. These commands are essential for maintaining the integrity of database transactions and providing control over complex operations.

Uploaded by

sachitam35
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

TCL_Command_In_SQL

TCL (Transaction Control Language) is a subset of SQL commands used to manage changes made by DML operations, ensuring data integrity and consistency in database transactions. Key TCL commands include COMMIT, which saves changes, ROLLBACK, which undoes changes, and SAVEPOINT, which allows for partial rollbacks. These commands are essential for maintaining the integrity of database transactions and providing control over complex operations.

Uploaded by

sachitam35
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7

TCL Command

BY - SACHITAM PATEL
Introduction to TCL Commands
 TCL stands for Transaction Control
Language, a subset of SQL commands.

 It is used to manage changes made by DML


(Data Manipulation Language) operations.

 TCL commands ensure data integrity and


consistency in database transactions.
Key TCL Commands

The primary TCL commands are :-

 COMMIT
 ROLLBACK
 SAVEPOINT

• COMMIT saves all changes made during the current transaction to


the database.

• ROLLBACK undoes changes made in the current transaction,


reverting to the last COMMIT.
Using COMMIT

The COMMIT command is essential for


finalizing transactions in a database.

It ensures that all changes are permanently


recorded and available for future queries.

Without a COMMIT, changes made during a


transaction will not be saved if the connection is
closed.
Using ROLLBACK

The ROLLBACK command is used to revert


uncommitted changes in a transaction.

It is particularly useful for error handling when


a part of a transaction fails.

By rolling back, users can maintain data


integrity by preventing partial updates.
Using SAVEPOINT

SAVEPOINT allows users to set a marker


within a transaction for potential rollback.

This command enables partial rollback to a


specific point without affecting the entire
transaction.

It provides greater flexibility and control over


complex transactions in SQL.
THANK
YOU

You might also like