database – What are the acronyms DDL, DML, DQL, DTL and DCL?

Question:

I was setting up a structure of permissions in the bank (GRANT, REVOKE), when I found this article and found it interesting to share, even to have it here on SOpt.

original question

  • What is DCL?

Source

Answer:

Think about it like this, the SQL language is only one, but it is divided into types according to the functionality of the commands.
The SQL language types are:

  • DDL – Data Definition Language – Data Definition Language.
    These are the commands that interact with database objects.

    • These are DDL commands: CREATE, ALTER and DROP
  • DML – Data Manipulation Language – Data Manipulation Language.
    These are the commands that interact with data within tables.

    • These are DML commands: INSERT, DELETE and UPDATE
  • DQL – Data Query Language – Data Query Language.
    These are the query commands.

    • These are DQL commands: SELECT (it is the query command)
      Here fits a parenthesis. In some books the SELECT is in the DML in others it has this group of its own.
  • DTL – Data Transaction Language – Data Transaction Language.
    These are the commands for transaction control.

    • These are DTL commands: BEGIN TRANSACTION, COMMIT AND ROLLBACK
  • DCL – Data Control Language – Data Control Language.
    These are the commands to control the security part of the database.

    • These are DCL commands: GRANT, REVOKE and DENY.

original author

Luiz Fernando
Source

Scroll to Top