|Table of contents|
SQL consists of these component languages:
|DDL||Data Definition||Create table, create index|
|DML||Data Manipulation||Insert, Delete, Update|
|DCL||Data Control||Grant, revoke|
|TPL||Transaction Processing||Begin work, Rollback, Commit|
By the end of this page you should be able to:
Data Definition Language (DDL)
The Data Definition Language (DDL) is used to create and delete databases and tables. The following SQL Commands are available;
- CREATE DATABASE creates a new database.
- DROP DATABASE removes a database and any tables it contains.
- CREATE TABLE creates a new table.
- DROP TABLE removes a table and any data it contains.
- ALTER TABLE modifies the structure of an existing table.
- CREATE INDEX adds an index to a table.
- DROP INDEX removes an index from a table.
Data Manipulation Language (DML)
The Data Manipulation Language (DML) is used to change, add and delete data in an existing table. The following SQL Commands are available:
Data Query Language (DQL)
The Data Query Language (DQL)is used to display the data in a table or tables. The following SQL Commands are available:
SQL always produces a SET of data, which is basically a rectangular block of rows (records) and columns (fields). The data set produced is always a single table.
Data ControlLanguage (DCL)
Transaction Processing Language (TPL)
- Begin work