SQL Query Types Reference

Categories of SQL statements for data definition, manipulation, and control.

  • JSON3,376 B
  • YAML2,243 B · −34%
  • TOON1,782 B · −47%

The SQL statement categories: DDL for schema, DML for changing data, DCL for permissions, TCL for transactions and DQL for queries, each with its full name, the statements it contains and its purpose.

Use it when

  • You need to classify a SQL statement or explain the categories to a newcomer.
  • You are setting permissions by statement category.

Watch out for

  • Some sources fold SELECT into DML and omit DQL as a separate category.
  • Which statements are transactional differs by database; DDL is auto-committed in some systems and transactional in others.

The data

Query types

CategoryFull nameStatementsPurpose
DDLData Definition LanguageCREATE, ALTER, DROP, TRUNCATEDefine and modify database schema
DMLData Manipulation LanguageSELECT, INSERT, UPDATE, DELETEQuery and modify data
DCLData Control LanguageGRANT, REVOKEManage user permissions
TCLTransaction Control LanguageCOMMIT, ROLLBACK, SAVEPOINTManage database transactions
DQLData Query LanguageSELECTQuery data (subset of DML)

Fields

The shape of this dataset, read from the data itself: every column, its type and a real value. Agents can use this to plan a query without fetching the whole document.

SectionFieldTypeExample
query_typescategorystringDDL
query_typesfull_namestringData Definition Language
query_typesstatementsstringCREATE, ALTER, DROP, TRUNCATE
query_typespurposestringDefine and modify database schema

Fetch the same bytes

The static files contain the same reference rows as the API, with no API rate limit. Live metadata, such as view counts, may differ. Use the API for content negotiation; use the static files for a cacheable snapshot.

curl "https://yjtoon.com/api/dataset/sql-query-types?format=toon"
const res = await fetch(
  "https://yjtoon.com/static-data/dataset/sql-query-types.toon"
);
const toon = await res.text();

Rate limit: 120 requests per minute per IP, no key and no signup. API reference →

Topics

  • sql
  • database
  • query
  • reference

Search the library

Search by a topic, title, or keyword.

Start with a collection

Browse all 205 datasets