what are the transaction control commands
Private research annotation
Sign in to add a private research label or note.
- User
what are the transaction control commands
- Assistant
The transaction control commands are:
-
COMMIT - Used to save changes made in a transaction to the database.
-
ROLLBACK - Used to undo changes made in a transaction and revert to the previous state of the database.
-
SAVEPOINT - Used to create a savepoint within a transaction, which allows the transaction to be rolled back to a specific point in case of errors.
-
SET TRANSACTION - Used to set the transaction isolation level and other properties for a transaction.
-
BEGIN TRANSACTION - Used to start a new transaction.
-
SET IMPLICIT_TRANSACTIONS ON/OFF - Used to enable or disable implicit transactions.
-
- User
command in data manipulation language
- Assistant
Some common commands in Data Manipulation Language (DML) are:
-
SELECT - Used to retrieve data from one or more tables.
-
INSERT - Used to insert new data into a table.
-
UPDATE - Used to modify existing data in a table.
-
DELETE - Used to remove data from a table.
-
MERGE - Used to combine data from two tables into a single result set.
-
TRUNCATE - Used to delete all rows from a table.
-
EXPLAIN - Used to display the execution plan for a query.
-
CALL - Used to invoke a stored procedure or function.
-
- User
commands in data definition language
- Assistant
Some common commands in Data Definition Language (DDL) are:
-
CREATE - Used to create tables, indexes, views, stored procedures, and other database objects.
-
ALTER - Used to modify the structure of tables, views, indexes, and other database objects.
-
DROP - Used to remove tables, views, indexes, stored procedures, and other database objects.
-
TRUNCATE - Used to remove all rows from a table.
-
RENAME - Used to rename tables, columns, and other database objects.
-
GRANT - Used to give users or roles permission to access database objects.
-
REVOKE - Used to remove permissions previously granted to users or roles.
-
COMMENT - Used to add comments to tables, columns, and other database objects.
-
ANALYZE - Used to analyze the performance of database objects.
-
VACUUM - Used to reclaim disk space and optimize storage of database objects.
-