SQL2003 Statement Classes

Comparing statement classes further delineates SQL2003 from SQL92. However, you will still hear these terms bantered about. So you need to know them. In SQL92, SQL statements are grouped into three broad categories:

Data Manipulation Language (DML)

Provides specific data-manipulation commands such as SELECT, INSERT, UPDATE, and DELETE.

Data Definition Language (DDL)

Contains commands that handle the accessibility and manipulation of database objects, including CREATE and DROP.

Data Control Language (DCL)

Contains the permission-related commands GRANT and REVOKE.

In contrast, SQL2003 supplies seven core categories, now called classes, that provide a general framework for the types of commands available in SQL. These statement “classes” are slightly different than the SQL92 statement categories, since they attempt to identify the statements within each class more accurately and logically. Furthermore, because SQL is constantly under development, new features and commands enter the standard and may necessitate new statement classes. So, SQL2003 has a new sets of statement classes, originally added in the SQL99 standard, making them somewhat more comprehensible and logical. Additionally, the new statement classes now allow some “orphaned” statements—which did not fit well into any of the old categories—to be properly classified.

Table 1-1 identifies the SQL2003 statement classes and lists some commands in each class, each of which is fully discussed later. At ...

Get SQL in a Nutshell, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.