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.
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.
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.