What means DDL, DML, TCL and DCL? Tuesday, October 13, 2009

There're four catalogs in standard SQL language:

  1. DDL-----Data Defination Language
  2. DML-----Data Manipulation Language
  3. DCL------Data Control Language
  4. TCL------Transaction Language
The detaled information is as belowing 
1> The DDL includes
CREATE TABLE - creates new database table
ALTER TABLE - alters or changes the database table
DROP TABLE - deletes the database table
CREATE INDEX - creates an index or used as a search key
DROP INDEX - deletes an index 
2> The DML includes
SELECT - extracts data from the database
UPDATE - updates data in the database
DELETE - deletes data from the database
INSERT INTO - inserts new data into the database
3> The DCL includes
GRANT – gives access privileges to users for database
REVOKE – withdraws access privileges to users for database
4> The TCL includes
COMMIT – saves the work done
ROLLBACK - restore the database to original since the last COMMIT

Regarding how to use SQL, pls refer to this link. http://sql.1keydata.com/cn/  

0 comments: