Explore the structure of SQL statements

Completed

In any SQL dialect, the SQL statements are grouped together into several different types of statements. These different types are:

  • Data Manipulation Language (DML) is the set of SQL statements that focuses on querying and modifying data. DML statements include SELECT, the primary focus of this training, and modification statements such as INSERT, UPDATE, and DELETE.
  • Data Definition Language (DDL) is the set of SQL statements that handles the definition and life cycle of database objects, such as tables, views, and procedures. DDL includes statements such as CREATE, ALTER, and DROP.
  • Data Control Language (DCL) is the set of SQL statements used to manage security permissions for users and objects. DCL includes statements such as GRANT, REVOKE, and DENY.

Sometimes you may also see TCL listed as a type of statement, to refer to Transaction Control Language. In addition, some lists may redefine DML as Data Modification Language, which wouldn't include SELECT statements, but then they add DQL as Data Query Language for SELECT statements.

In this module, we'll focus on DML statements. These statements are commonly used by data analysts to retrieve data for reports and analysis. DML statements are also used by application developers to perform "CRUD" operations to create, read, update, or delete application data.