SQL provides set of commands for a variety of tasks including the
following:
- Querying data
- Updating, inserting and deleting data
- Creating, modifying and deleting database objects
- Controlling access to the database
- Providing for data integrity and consistency.
SQL statements are
divided into the following categories
- Data Definition Language(DDL)
- Data Manipulation Language(DML)
- Data Query Language (DQL)
- Data Control Language (DCL)
1) Data Definition
Language(DDL)
This is used to
create, alter and delete database objects
The commands used
are create, alter and drop
- Create table, create view, drop index
- Alter table
- Drop table, drop view, drop index
2) Data Manipulation
Language(DML)
Data manipulation
language commands let users insert, modify and delete the data in the database.
SQL provides three data manipulation statements insert, update and delete
3) Data Query Language
(DQL)
This is one of
the most commonly used SQL statements. This SQL statement enables the users to
query one or more tables to get the information they want. SQL has only one
data query statement 'select.'
4) Data Control Language
(DCL)
The data control
language consists of commands that control the user access to the database
objects. Various DCL commands are : Commit, Rollback, Save point, Grant,
Revoke.
spP � b p � �� time stamp '2005-04-25 08:25:30.45'
Dates must be specified in the format-year followed by
month followed by day, as shown. The seconds field of time or timestamp can
have a fractional part, as in the timestamp above
No comments:
Post a Comment