SQL stands for structured query language. The structured query language is a relational database language by it self, SQL does not make a DBMS itself. SQL is a medium which is used to communicate to the DBMS.
SQL is a command based language used for storing and managing data in relational database management system. SQL was the first commercial language introduced by E.F.Codd relational relational database model in 1970. Today almost all RDBMS users SQL as the standard database language. SQL is used to perform all type data operations in RDBMS.
Why SQL?
- Allows users to access data in relational database management system.
- Allows users to describe the data.
- Allows users to define the data in the database and manipulate that data.
- Allows to embedded with other programming languages using modules, libraries, and per-processors.
- Allows users to create and drop database and tables.
- Allows users to create view, stored procedures, functions in a database.
- Allows users to set permission on tables, procedures and views
The form of basic SQL Query
Clauses are used to construct an SQL statement so that when executed the statement will perform a particular function.
The basic form of an SQL query is:
SELECT [DISTINCT] {*| column_name (, column_name,...)}
FROM table_name [alias] (, table_name,...)
[WHERE condition]
[GROUP BY column_list] [HAVING condition]
[ORDER BY column_list]
The table below lists and describes the most commonly used SQL clauses. An SQL clause within bracket [ ] indicates the clause is optional.
S.No |
SQL Clause |
Function Performed |
1 |
SELECT |
specifies which columns are to appear in the output |
2 |
DISTINCT |
eliminates duplicates |
3 |
From |
specifies the tables to be used |
4 |
Where |
filters the rows according to the condition |
5 |
Group By |
forms groups of rows with the same column value |
6 |
Having |
filters the group |
7 |
Ordered By |
sorts the order of the output |
0 comments :
Post a Comment
Note: only a member of this blog may post a comment.