Different sub-languages of SQL.

Different sub-languages of SQL.
5 (100%) 3 votes

When we talk about databases. One of the biggest types that exists is SQL. SQL or Structured Query Language is used where you have to keep data that is relational in nature. Mysql, Postgres, DB2 are the different software that implements it. SQL comprises of many sub-languages that provide different capabilities to SQL. The capabilities that are provided by sub-languages of SQL are creation, manipulation of data, querying and control on it.

Now when we talk about different types of sub-languages that are supported by SQL, people generally know about DDL(Data Definition Language) and DML(Data Manipulation Language). In this article, we will talk about other types of sub-languages in SQL and what commands they provide to work with SQL.

sub-languages of sql

DML (Data Manipulation Language):

In DML, we try to manipulate the data. Commands like INSERT and UPDATE are part of this sub-language.

DDL (Data Definition Language):

In DDL, we define the data structure and relation between them. Commands like CREATE are part of this.

DCL (Data Control Language):

In DCL, we control access to data. This is used for permission management and who can access the data. Commands like GRANT and REVOKE are part of this sub-language.

TCL (Transaction Control Language):

In TCL we control the flow in a transaction. COMMIT and ROLLBACK are part of this sub language.

DQL (Data Query Language):

In DQL, we query the data. SELECT command is part of DQL.

Below is the table of commands that exist in these sub-languages.

DDLDMLDQLTCLDCL
CREATE
DROP
RENAME
TRUNCATE
ALTER
INSERT
UPDATE
DELETE
SELECTCOMMIT
ROLLBACK
SAVEPOINT
GRANT
REVOKE

These were the sub-languages of SQL and what commands are part of which sub-language.

If you like the article please share and subscribe. You can also join our Facebook, LinkedIn or Twitter for regular updates on new tech articles.

READ MORE ABOUT MYSQL OPTIMIZATION HERE


Gaurav Yadav

Gaurav is cloud infrastructure engineer and a full stack web developer and blogger. Sportsperson by heart and loves football. Scale is something he loves to work for and always keen to learn new tech. Experienced with CI/CD, distributed cloud infrastructure, build systems and lot of SRE Stuff.

1 COMMENT
  • Gulshan
    Reply

    Ok Bhaiya

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.