What is SQL?
SQL is Structured Query Language, which is used for storing,
manipulating and retrieving data stored in relational database.
SQL is the standard language for Relation Database
System.Examples: MySQL, MS Access, Oracle, Sybase, Informix, postgres and SQL
Server all use SQL .
Why to use SQL?
SQL allows users to access data in
relational DBMS it allows users to describe the data.along with that users can
define the data in database and manipulate the data according to their
requirement and can perform various operations according to their need..More
over users can embed SQL within other languages using
SQL modules, libraries & pre-compilers and the most basic thing users can
create and drop databases and tables as per required using simple queries. It
is also possible to create views, stored procedures and functions in the
database for better efficiency and proper utilization of the database. The
queries like simple to learn and you will easily learn them as go proceed in
this tutorial
SQL command Execution Process:
SQL Execution Process |
While executing an SQL command the SQL
Engine decides how to interpret the task.
Components included in the process:
Query Dispatcher, Optimization Engines,
Classic Query Engine and SQL Query Engine
Types of SQL Commands:
1.
DDL - Data
Definition Language
2.
DML - Data
Manipulation Language:
3.
DCL - Data Control
Language:
4.
DQL - Data Query
Language:
4.
DDL - Data Definition Language
Command
|
Description
|
CREATE
|
Creates a new table, a view of a table,
or other object in database
|
ALTER
|
Modifies an existing database object,
such as a table
|
DROP
|
Deletes an entire table, a view of a
table or other object in the database
|
DML - Data Manipulation Language
Command
|
Description
|
INSERT
|
Creates new records in the database
|
UPDATE
|
Updates existing records in the
database
|
DELETE
|
Deletes a record from the database
|
DCL - Data Control Language:
Command
|
Description
|
GRANT
|
Used to grant privileges to a user
|
REVOKE
|
Used to revoke privileges from a user
|
DQL - Data Query Language:
Command
|
Description
|
SELECT
|
Retrives
certain records from one or more tables in the database
|