SQL Sub Languages

The sub-languages that SQL supports fall into 5 categories. The primary purpose of these sub-languages is to add, remove, or change database objects, and they also assist in data manipulation.

  • DDL – Data Definition Language.
    • CREATE: This command will help in creating the database objects such as databases, tables, indexes, views, stored procedures, triggers and functions.
    • ALTER: This command will help in modifying the database objects.
    • DROP: This command will help in removing the database objects
    • TRUNCATE: This command will help in removing the data from a table.
  • DML – Data Manipulation Language.
    • INSERT: This command will help in inserting the records in a table.
    • UPDATE: This command will help in modifying the existing data from a table.
    • DELETE: This command will help in deleting the data from a table.
  • DQL – Data Query Language.
    • SELECT: This command will help in retrieving the data or metadata from the tables.
  • TCL – Transaction Control Language. (SCL – Session Control Language)
    • COMMIT: This command will help in committing the transaction.
    • ROLLBACK: This command will help in reversing/rollback a transaction.
    • SAVEPOINT: This command will help in book marking a specific point in a transaction.
  • DCL – Data Control Language.
    • GRANT: This command will help in granting the permissions to the users/roles.
    • REVOKE: This command will help in revoking the permissions from the users/roles.

I hope this essay was useful to you.

Please subscribe if you would like to get updates on new posts.

One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s