Commands In SQL
Data Definition Language (DDL):
These commands are used to define the database schema.
The following commands are used in DDL:
- CREATE: Used in the creation of a database.
- DROP: Used in the deletion of objects from the database.
- ALTER: Used in the alteration of the structure of the database.
- TRUNCATE: Used for the deletion of all the records from the table.
- COMMENT: Used in the addition of comments to the database dictionary.
- RENAME: Used in the renaming of an existing object in the database.
Data Query Language (DQL)
These commands are used for performing queries on data.
- SELECT: It is used to retrieve data from the database.
Data Manipulation Language (DML)
These commands are used to manipulate the data present in the database.
- INSERT : This command is used to insert data into the table
- UPDATE: This command is used to update existing data into the table.
- DELETE: This command is used to delete objects from the table.
- SELECT : This command selects attributes from relations.
Data Control Language (DCL)
These commands control the database system
- GRANT : Gives the user access to the database.
- REVOKE : Withdraws the user access to the database.
Transaction Control Language (TCL)
These commands control the transaction within the database
- COMMIT: Permanently commits a transaction
- ROLLBACK: In case of an error, it rolls back the transaction
- SAVEPOINT : A savepoint is set within a translation.
- SET TRANSACTION: The characteristics of a transaction are specified
Reference :
Commands in DDL.