Data query language

Data query language (DQL) is a term used to describe the subset of SQL statements concerned with retrieving data from a database. It is commonly presented as one of several SQL sublanguages, alongside data definition language (DDL), data control language (DCL), and data manipulation language (DML). Some classifications additionally distinguish transaction control language (TCL).

Although DQL is widely used as a classification in educational materials and SQL tutorials, it is not formally defined as a separate SQL sublanguage in the international SQL standard, ISO/IEC 9075. The standard specifies SQL as a database language, including its syntax, semantics, and operations on data, without adopting the commonly taught division into DQL, DDL, DCL, and DML as a formal language classification.

Statements

DQL statements are used to retrieve information stored in a database. The principal SQL statement associated with DQL is SELECT, which retrieves data from one or more tables or views and produces a result set.

A SELECT statement may contain clauses such as FROM, WHERE, GROUP BY, HAVING, and ORDER BY to specify data sources, filter results, group records, or determine their presentation order. The inclusion of FROM or WHERE does not change a SELECT query into a data manipulation statement.

Relationship to data manipulation language

The distinction between DQL and DML depends on the classification system used. In classifications that distinguish data retrieval from data modification, SELECT is treated as part of DQL, while statements such as INSERT, UPDATE, and DELETE are considered DML.

In broader classifications, data retrieval is included within data manipulation language, and SELECT is therefore classified as a DML statement. The separation of DQL from DML is consequently a terminological convention rather than a requirement of the SQL standard.

References

  1. 1 2 3 Calasan, Marko (December 22, 2022). "What Are DDL, DML, DQL, and DCL in SQL?". LearnSQL.com. Retrieved February 25, 2026.
  2. ↑ "Data Query Language". Tpoint Tech. December 30, 2025. Retrieved February 25, 2026.
  3. 1 2 "ISO/IEC 9075-1:2023 — Information technology — Database languages SQL — Part 1: Framework (SQL/Framework)". International Organization for Standardization. 2023. Retrieved October 21, 2026.
  4. ↑ "PostgreSQL Documentation: SELECT". PostgreSQL Documentation. PostgreSQL Global Development Group. Retrieved October 21, 2026.