Introduction to DRL/DSL
- DRL/DSL stands for Data Retrieval Language/Data Selection Language.
- It is a set commands which are used to retrieve data from database server.
- It manipulates the data in database for display purpose like aggregate function.
- In DRL/DSL, for accessing the data it uses the DML command that is SELECT.
- The SELECT command allows database users to retrieve the specific information they desire from an operational database.
| Clause | Description |
|---|---|
| FROM | It is used for selecting a table name in a database. |
| WHERE | It specifies which rows to retrieve. |
| GROUP BY | It is used to arrange the data into groups. |
| HAVING | It selects among the groups defined by the GROUP BY clause. |
| ORDER BY | It specifies an order in which to return the rows. |
| AS | It provides an alias which can be used to temporarily rename tables or columns. |
Syntax:
SELECT {* | column_name1, column_name2, . . . , column_name_n}
FROM <list_of_tablename>
WHERE <condition>;
Example
SELECT * FROM employee
WHERE salary >=10000;
OR
SELECT eid, ename, age, salary
WHERE salary >=10000;


