From virtualMV2015wiki
Jump to: navigation, search
 Home  MySQL <



SQL consists of these component languages:

  Language Examples
DDL Data Definition Create table, create index
DML Data Manipulation Insert, Delete, Update
DQL Data Query Select
DCL Data Control Grant, revoke
TPL Transaction Processing Begin work, Rollback, Commit

Icon Objective.png


By the end of this page you should be able to:

  • List the five languages of SQL (DDL, DCL, DML, DQL and TPL)
  • Understand that SQL can be described using the Backus-Naur Form

Data Definition Language (DDL)

The Data Definition Language (DDL) is used to create and delete databases and tables. The following SQL Commands are available;

  • CREATE DATABASE creates a new database.
  • DROP DATABASE removes a database and any tables it contains.
  • CREATE TABLE creates a new table.
  • DROP TABLE removes a table and any data it contains.
  • ALTER TABLE modifies the structure of an existing table.
  • CREATE INDEX adds an index to a table.
  • DROP INDEX removes an index from a table.

Data Manipulation Language (DML)

The Data Manipulation Language (DML) is used to change, add and delete data in an existing table. The following SQL Commands are available:


Data Query Language (DQL)

The Data Query Language (DQL)is used to display the data in a table or tables. The following SQL Commands are available:


SQL always produces a SET of data, which is basically a rectangular block of rows (records) and columns (fields). The data set produced is always a single table.

Data ControlLanguage (DCL)

  • Grant
  • Revoke

Transaction Processing Language (TPL)

  • Begin work
  • Rollback
  • Commit

Icon References.png References

SQL:Components. (2017). In virtualMV's ( Michael Verhaart ) wiki. Retrieved December 17, 2017, from http://www.virtualmv.com/wiki/index.php?title=SQL%3AComponents    (zotero)