SQL usage
SQL has following subsets:
- Data Definition Language (DDL)
- Data Manipulation Language (DML)
- Data Query Language (DQL)
- Data Control Language (DCL)
Data Definition Language (DDL)
The SQL DDL category provides commands for defining, deleting and modifying tables in a database. Use the following commands in this category.
Data Query Language (DQL)
DQL provides commands to retrieve and query from database.
Data Manipulation Language (DML)
DML provides commands to insert, update delete data in the database
Data Control Language (DCL)
DCL deals with the rights and permissions of users of a database system. Following commands are used:
GRANT
: Gives privileges required to allow users to access and manipulate the database.
REVOKE
: Remove permissions
Transaction Control Language (TCL)
It allows SQL statements to be grouped together into logical transactions.
COMMIT
: Command to save all the work done to the DB.
ROLLBACK
: Command to restore a database to the last committed state.