SQL - Strucured Query Language

Structured Query Language is relational database language that is used to retrive data from data sets. SQL This can be used for the following operations on data sets.

  1. Store Data
  2. Retrive Data
  3. Delete Data

Here term data set refers to relational modal where data is stored in form of table. 

Each Database Management System support SQL. We must have to follow the rules and syntax of SQL for various data operations.

SQL Commands:

SQL commands are instruction that are passed to DBM for process of data. Some common commands are as follows.

Sr Command Description
1 SELECT Select command is used to retrive data from database (data set) using Database Management System.
2 INERT INTO Insert Into command is used to store data in database.
3 DELETE Delete command is used to remove data from database permanently.
4 UPDATE Update Command is used to update data/record or set of records in database.
5 DROP Drop command is used to delete table from the database.

SQL Command Types:

SQL command are mainly divided into three categories/types. These commands are used to perform different operations.

1. DDL (Data Defination Language):

Data defination language isused to define database structure/defination. This may include addition/removal of data or data sets from the database. Some common commands of DDL are as follows.

  • CREATE
  • DROP
  • ALTER

2. DML (Data Manipulation Language):

Data manipulation language is used to perform data operations rather than structure/defination change. These operations include insertion,removal or updation  of data in database. Some common DML commands are as follows.

  • INSERT
  • SELECT
  • DELETE
  • UPDATE

3. DCL (Data Control Language):

Data control language is consist of comaands that are used to control user rights and permissions for security and data integrity purpose. These operations include data privileges. Some common DCL commands are as follows.

  • GRANT
  • REVOKE

4. TCL (Transaction Control Language):

Trnasaction control language is used for atomicity purpose. Atomicity means the completion of transaction which may consist of various operations. SQL also provide some commands for transaction control. There are two most common TCL commands.

  • COMMIT
  • ROLLBACK

SQL Command Types DML, DCL, DDL and TCL 

Comments
Login to TRACK of Comments.