SQL Statement Classes

Long-standing classes for SQL statements originated back in the days of the SQL92 standard.  These classifications are still common:

Data Manipulation Language (DML): SQL statements which manipulate data, such as SELECT, INSERT, UPDATE, DELETE and MERGE.

Data Definition Language (DDL): SQL statements control the creation, modification, and removal of database objects, such as CREATE, ALTER and DROP.

Data Control Language (DCL): SQL statements related to permissions to execute and access database objects and data, such as GRANT and REVOKE.

 Starting with SQL3, seven core categories define the elements of the SQL standard, as shown in the following table:

Category Description Examples
SQL connection statements Starts and ends a client connection CONNECT, DISCONNECT
SQL control statements Controls the execution of a set of SQL statements CALL, RETURN
SQL data statements  Manipulates or alters data SELECT, INSERT, UPDATE, DELETE, MERGE
SQL diagnostic statements Provides diagnostic information, exceptions and errors GET DIAGNOSTICS  
SQL schema statements  Manipulates or alters database schemas and objects within that schema ALTER, CREATE, DROP
SQL session statements  Controls default behavior for a user session SET
SQL transaction statements  Sets the start and end point of a transaction COMMIT, ROLLBACK


If you work regularly with SQL, then you should become familiar with both the old (SQL92) and the new (SQL3) statement classes, since both nomenclatures are frequently used to refer to SQL features and statements.

Google Author

Speak Your Mind

*