Types of SQL Statements
SQL statements and are divided into these categories:
1. Data Definition Language (DDL) Statements
2. Data Manipulation Language (DML) Statements
3. Transaction Control Statements
4. Session Control Statements
5. System Control Statement
6. Embedded SQL Statements
1. Data Definition Language (DDL) Statements
Data definition language (DDL) statements let you to perform these tasks:
1. Create, alter, and drop schema objects
2. Grant and revoke privileges and roles
3. Analyze information on a table, index, or cluster
4. Establish auditing options
5. Add comments to the data dictionary
The DDL statements are:
ALTER ... (All statements except ALTER SESSION and ALTER SYSTEM
ANALYZE
ASSOCIATE STATISTICS
AUDIT
COMMENT
CREATE
DISASSOCIATE STATISTICS
DROP ... (All statements beginning with DROP)
FLASHBACK ... (All statements beginning with FLASHBACK)
GRANT
NOAUDIT
PURGE
RENAME
REVOKE
TRUNCATE
2. Data Manipulation Language (DML) Statements
Data manipulation language (DML) statements access and manipulate data in
existing schema objects. These statements do not implicitly commit the current
transaction. The data manipulation language statements are:
CALL
DELETE
EXPLAIN PLAN
INSERT
LOCK TABLE
MERGE
SELECT
UPDATE
3. Transaction Control Statements
Transaction control statements manage changes made by DML statements. The
transaction control statements are:
COMMIT
ROLLBACK
SAVEPOINT
SET TRANSACTION
SET CONSTRAINT
4. Session Control Statements
Session control statements dynamically manage the properties of a user
session. These statements do not implicitly commit the current transaction.
PL/SQL does not support session control statements. The session control
statements are:
ALTER SESSION
SET ROLE
5. System Control Statement
The single system control statement, ALTER SYSTEM, dynamically manages
the properties of an Oracle database instance. This statement does not
implicitly commit the current transaction and is not supported in PL/SQL.
6. Embedded SQL Statements
Embedded SQL statements place DDL, DML, and transaction control
statements within a procedural language program. Embedded SQL is supported
by the Oracle pre-compilers