Wednesday, February 26, 2014

Components of SQL (Structured Query Language)

In this post, we will discuss about the components of SQL (Structured Query Language)

There are five components in SQL. 

1. Data Retrieval / Query Language

Eg. Select - this command is used to write a statement to retrieve the information from database objects like tables, views etc for read only purpose. 

2. Data Manipulation Language

This is used to insert / modify / delete the data from the database. 

Eg. Insert - This command is used to write a statement to insert new data into database object(s)
     Update - This command is used to write a statement to update any existing data in the database object(s)
     Delete - This command is used to write a statement to delete data from the database object(s)

3. Data Definition Language

This is used to define database objects.

Eg. We can create / modify / delete the definition of a database object(s)

Commands used are : Create, Alter, Drop, Truncate and Rename

4. Data Control Language

This is used to share the information or privileges between users.

Eg., Grant and Revoke

5. Transaction Control Language

This is used to save or cancel the DML operations / transactions. 

Eg., Commit, Rollback and Savepoint



Hope you got the overview of different components of SQL. 

No comments:

Post a Comment