Types of SQL statements
There are several basic types of SQL statements. They are listed here according to their functions.
- SQL schema statements, also known as data definition language (DDL) statements
- SQL data and data change statements, also known as data manipulation language (DML) statements
- Dynamic SQL statements
- Embedded SQL host language statements
SQL schema statements | SQL data statements |
---|---|
ALTER FUNCTION |
ALLOCATE CURSOR |
SQL data change statements | SQL connection statements |
---|---|
DELETE |
CONNECT |
SQL transaction statements | SQL session statements |
---|---|
COMMIT |
DECLARE GLOBAL TEMPORARY TABLE |
Dynamic SQL statements | Embedded SQL host language statements |
---|---|
ALLOCATE DESCRIPTOR |
BEGIN DECLARE SECTION |
SQL control statements | |
---|---|
CALL |
SQL statements can operate on objects that are created by SQL as well as externally described physical files and single-format logical files. They do not refer to the interactive data definition utility (IDDU) dictionary definition for program-described files. Program-described files appear as a table with only a single column.