Computer Applications

Tuesday, January 5, 2010

SQL (Structured Query Language).

SQL is a standard language for accessing databases.

1. SQL stands for Structured Query Language
2. SQL lets you access and manipulate databases
3. SQL is an ANSI (American National Standards Institute) standard

SQL can do

It can execute queries against a database
It can retrieve data from a database
It can insert records in a database
It can update records in a database
It can delete records from a database
It can create new databases
It can create new tables in a database
It can create stored procedures in a database
It can create views in a database
It can set permissions on tables, procedures, and views

SQL can be divided into two parts:
1.The Data Manipulation Language (DML)
2. The Data Definition Language (DDL).

DML

The query and update commands form the DML part of SQL:
SELECT - extracts data from a database
UPDATE - updates data in a database
DELETE - deletes data from a database
INSERT INTO - inserts new data into a database

DDL

CREATE DATABASE - creates a new database
ALTER DATABASE - modifies a database
CREATE TABLE - creates a new table
ALTER TABLE - modifies a table
DROP TABLE - deletes a table
CREATE INDEX - creates an index (search key)
DROP INDEX - deletes an index

No comments:

Post a Comment