Question

    Which of the following commands is part of the

    Transaction Control Language (TCL) in SQL?
    A SELECT Correct Answer Incorrect Answer
    B COMMIT Correct Answer Incorrect Answer
    C UPDATE Correct Answer Incorrect Answer
    D ALTER Correct Answer Incorrect Answer
    E DROP Correct Answer Incorrect Answer

    Solution

    Transaction Control Language (TCL) commands in SQL are used to manage transactions in a database, ensuring that operations are executed reliably. COMMIT is a TCL command that finalizes a transaction, making all its changes permanent in the database. For example, in a banking application, if a transaction involves debiting one account and crediting another, the COMMIT command ensures these changes are saved only when both operations succeed. This guarantees data integrity. Without TCL commands like COMMIT, rollback mechanisms would not work effectively, and transactional integrity could be compromised. Why Other Options Are Incorrect :

    1. SELECT : This is a Data Query Language (DQL) command used for retrieving data, not managing transactions.
    2. UPDATE : This is a Data Manipulation Language (DML) command used to modify data, not a TCL command.
    3. ALTER : This is a Data Definition Language (DDL) command used for modifying table structures, unrelated to transactions.
    4. DROP : Another DDL command, used for deleting database objects, not for controlling transactions.

    Practice Next