What is SQL

SQL (pronouncing as ‘sequel’) means Structured Query Language. It is a programming language to manage data which is stored in an organized manner.

Why SQL ?

How SQL originated ? Every body know that data is the back bone of any organization or company. So cost effective data management is vital. So there should be a common tool to handle and this leads to development of SQL.

History

SQL developed by IBM in 1970. In 1986 ANSI (American National Standards Institute) standardized the SQL and it is referred as ANSI SQL.

Basic Components of SQL

SELECT, INSERT, UPDATE and DELETE are the primary components of basis SQL.

SELECT – Uses to fetches and displaying the data in a structured manner.

INSERT – Uses to store data into the database.

UPDATE – Update or modify the stored data.

DELETE – Removing the stored data.

SELECT statement is the most widely and frequently used one.

To explain the above statements we need to define a table ( This is called the basic data storage unit in database ) first. Assume that

EMP table stores employee details like Empno, Name, Age,

Structure of EMP Table

Empno

Name

Age

10

Mark

26

20

Adam

30

30

Gary

33

40

Lisa

27

There are 4 records in EMP table.

SELECT statement

Example :- select * from EMP;

Explanation :-

The above statement will fetch all records from a table called EMP.

INSERT statement

Example :- insert into EMP values(50,‘Lo‘,33);

Explanation :-

The above statement will insert one records into EMP table.

UPDATE statement

Example :- update EMP set name = ‘Lopez‘ where Empno = 50;

Explanation :-

The above statement will update name column in EMP table.

Delete statement

Example :- delete from EMP where Empno = 50;

Explanation :-

The above statement will update name column in EMP table.

Apart from above four components there are many complex components are available in modern SQL.

Learn SQL

Generally speaking SQL is a complex programming language. Mastering SQL need many years of learning and experience, even though you can easily learn basic SQL in few days. To learn initially we need a database management system. In market there are many database products are available. Oracle, Microsoft SQL Server, DB2, MySQL, PostgreSQL etc. For educational purpose most of them are free. You can download and install in your desktop or laptop and start learning SQL today itself.