0% found this document useful (0 votes)
24 views

Types of SQL Statements

This document categorizes and describes the different types of SQL statements. It outlines 6 categories of SQL statements: 1) Data Definition Language statements which are used to create, alter and drop database objects; 2) Data Manipulation Language statements which access and manipulate data; 3) Transaction Control statements which manage transactions; 4) Session Control statements which manage session properties; 5) System Control statements which manage database instance properties; and 6) Embedded SQL statements which allow SQL statements to be placed within procedural languages.

Uploaded by

akshay
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Types of SQL Statements

This document categorizes and describes the different types of SQL statements. It outlines 6 categories of SQL statements: 1) Data Definition Language statements which are used to create, alter and drop database objects; 2) Data Manipulation Language statements which access and manipulate data; 3) Transaction Control statements which manage transactions; 4) Session Control statements which manage session properties; 5) System Control statements which manage database instance properties; and 6) Embedded SQL statements which allow SQL statements to be placed within procedural languages.

Uploaded by

akshay
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

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

You might also like