Types of SQL Statements

The SQL statements can be categorized into four different categories depending upon there usage.

1)  Data Manupulation Language (DML)
Description - DML statements are usaeful for retrieval of dat from the database tables , enters new rows , change rows, and remove unwanted rows from tables in the database.

Examples of  Data Manupulation Language (DML)
·                     SELECT
·                     INSERT
·                     UPDATE
·                     DELETE
·                    MERGE


2) Data Definition Language(DDL)
Description -DDL statements are used to create , remove , change  database schema objects.

Examples of Data Definition Language(DDL)
·                     CREATE
·                     ALTER
·                     DROP
·                     TRUNCATE
·                     RENAME
·                    COMMENT

3) Data Control Language(DCL)
Description: DCL statements are used to control access to the database schema objects and database itself.

Examples of  Data Control Language(DCL)

·                     GRANT
·                    REVOKE

4) Transaction Control (TCL)
Description : These statements used to manage the changes made by DML statements. 
Changes to the data can be grouped together into logical transaction.

Examples of Transaction Control (TCL)
·                     COMMIT
·                     ROLLBACK
·                     SAVEPOINT

Powered by Blogger.