You are on page 1of 2

Introduction to SQL

SQL stands for Structured Query Language and is used to access and manipulate
information from databases

SQL
• SQL allows users to access data in relational database management systems, such as
Oracle,Informix,Sybase, Microsoft SQL Server, Access etc.

• SQL allows users to manipulate and define the data in a database.

• SQL is an ANSI standard computer language

Strucured Query Language


SQL may frequently pronounced “sequel” but the alternate pronunciation “S.Q.L.” is also used. As the
name implies, SQL is a computer language that you use to interact with a database. In fact, SQL
works with a specific type of database, called a relational database.

SQL is more than a query tool, although that was its original purpose, and retrieving data is still one of
its most important functions. SQL is used to control all of the functions of DBMS which provides for its
users, including:

• Data Definition Language. In DDL user define the structure and organization of the stored
data and relationships among the stored data items.

• Data Retrieval Language. An application program to retrieve stored data from the database
and use it.

• Data Manipulation Language. DML allows a user or an application program to update the
database by adding new data, removing old data, and modifying previously stored data.

• Data Control Language. DCL can be used to restrict a user’s ability to retrieve, add, and
modify data, protecting stored data against unauthorized access.

• Data sharing. Is used to coordinate data sharing by concurrent users, ensuring that they do
not interfere with one another.

• Data intigrity.It defines integrity constraints in the database, protecting it from corruption
due to inconsistent updates or system failures.

SQL Queries
Query is a loose term that refers to a widely available set of SQL commands called clauses. Each
clause or command performs some sort of function against the database. For instance, the create
clause creates tables in databse and the select clause selects rows that have been inserted into your
tables.

Construction of Query begins with one of the following clauses:

• Add
• Drop
• Create
• Insert
• Select
• Update
• Replace

• Delete

SQL Query Syntax


The syntax of a query is loose, meaning you are free to place line breaks and spacing where you
please without injuring the code.Few instances require parentheses, including the insert statement
listed below. Parentheses will also be covered during our Functions lesson. Be sure to end all query
statements with a semicolon (;).

SQL Code:

SELECT * FROM table_name;