|
Answer» Following are the different types of SQL commands : - Data Definition Language (DDL): DDL commands are those commands that modify the table's STRUCTURE, such as by adding, deleting, or changing a table. All DDL commands are auto-committed, which MEANS they store all database changes permanently. Example - Create, Drop, Truncate, Alter.
- Data Manipulation Language (DML): The database is modified using DML commands. It is in charge of all database modifications of any kind. The DML command is not auto-committed, which means it cannot preserve all database modifications permanently. They have the potential to be ROLLED back. Example - Insert, Update, Delete.
- Data Control Language: Any database user can be granted or revoked authority using DCL commands. Example - Grant, Revoke.
- Transaction Control Language (TCL): Transaction Control Language commands are commands that are used to manage transactions in a database. Only DML commands like INSERT, DELETE, and UPDATE can be used with TCL commands. Because these ACTIVITIES are automatically committed to the database, they can't be used while creating or DROPPING tables. Example - Commit, Rollback, Savepoint.
- Data Query Language (DQL): DQL commands are used to fetch data from the database. Example - Select.
|