logo

DQL vs DDL vs DCL vs DML

Last Updated: 2022-03-21

SQL consists of many types of statements, they may be informally classed as sublanguages:

  • Data Manipulation Language (DML)
    • DML is about content, data, "rows"
    • e.g. INSERT, UPDATE or DELETE.
  • Data definition or data description language (DDL)
    • DDL is about table, index, schema, metadata, "columns"
    • e.g. CREATE, ALTER, TRUNCATE or DROP.
  • data control language (DCL)
    • DCL is about authorization, it controls access to data stored in a database.
    • e.g. GRANT, REVOKE
  • Data query language (DQL)
    • DQL is used for performing queries on the data within schema objects.
    • e.g. SELECT, FROM, WHERE