Saturday, 23 April 2022

Introduction to SQL - The form of basic SQL Query

 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?

  1. Allows users to access data in relational database management system.
  2. Allows users to describe the data.
  3. Allows users to define the data in the database  and manipulate that data.
  4. Allows to embedded with other programming languages using modules, libraries, and per-processors.
  5. Allows users to create and drop database and tables.
  6. Allows users to create view, stored procedures, functions in a database.
  7. 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.

Machine Learning

More

Advertisement

Java Tutorial

More

UGC NET CS TUTORIAL

MFCS
COA
PL-CG
DBMS
OPERATING SYSTEM
SOFTWARE ENG
DSA
TOC-CD
ARTIFICIAL INT

C Programming

More

Python Tutorial

More

Data Structures

More

computer Organization

More
Top