DQL Full Form

Structured Query Language (SQL) is a non procedural language used for retrieving data from the queries. It was introduced by IBM as a part of R project. It was declared as a standard language by ANSI and ISO.

It has subcategories:

  • DDL or Data Definition Language has commands like create, rename, alter.
  • DML or Data Manipulation Language has commands like update, insert, delete.
  • DCL or Data Control Language has commands like grant and revoke.
  • TCL or Transaction Control Language has commands like rollback, commit.

Data Manipulation Language has a subcategory:

Data Query Language (DQL) or Data Retrieval Language (DRL). Data Query Language has commands that retrieve the data from the query. It has a single command: select.

Characteristics of DQL:
It is used for retrieving data. A user can retrieve data according to his/her requirements using select command.



Example:
If a user want to retrieve all the from the employee table, the query must be given as follows:

select *
from employee;  

asterisk mark (*) indicates that all the rows is retrieved from the table.

If a user want to know the average salary of the employees, the query must be given as follows:

select avg(salary) 
from employee; 

This displays the average salary of the employees.
Here asterisk mark isn’t needed as we need to retrieve only particular rows.

If a user wants to know the name of the employee whose salary is less than 10, 000;the query is:

select ename 
from employee 
where salary<=10, 000; 

A condition is placed to retrieve the data and a relational operator is used as well.

Advantages:

  • select is a standard command used for almost every query.
  • It can also be written as SELECT as SQL is a case insensitive language.
  • It makes the data retrieving process more easier.

Disadvantages:

  • Data Query Language has no disadvantages.
  • It is not possible to imagine Structured Query Language without the select command.

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up


If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.