Monday, November 29, 2010

DML, DCL, DDL, TCL Statements

SQL commands are divided into categories like DML (Data Manipulation language), DDL (Data definition language), TCL (Tranction control language) and DCL (Data control language). Here is a list of SQL commands.
1. DML COMMANDS
  • INSERT
  • UPDATE
  • SELECT
  • DELETE
2.DDL COMMANDS
  • CREATE
  • ALTER
  • DROP 
3.TCL COMMANDS 
  • COMMIT
  •  ROLLBACK
4.DCL COMMANDS 
  • GRANT
  • REVOKE
-------------------------------------------------------------
 
DML
DML is abbreviation of Data Manipulation Language. It is used to retrieve, store, modify, delete, insert and update data in database.
DDL commands used to create the objects, DML commands used to manipulate the objects. DML commands are INSERT–This command is used to insert the records into table, UPDATE–This command is used to update the record which is already exisiting in the table, DELETE– This command is used to delete the record which is already existing the table. It is deletes only records not the structure.
Examples: SELECT, UPDATE, INSERT statements
DDL
DDL is abbreviation of Data Definition Language. It is used to create and modify the structure of database objects in database.
DDL is used to create the structure of the table. DDL commands are CREATE —Used to create any objects(Table,View,Trigger,Stored procedure) in the database. ALTER – Used to modify the objects in the database.DROP –this command used to drop the objects with the structure.TRUNCATE–This command also used to delete the objects. RENAME–used to modify the object name in the data base.

Examples: CREATE, ALTER, DROP statements
DCL
DCL is abbreviation of Data Control Language. It is used to create roles, permissions, and referential integrity as well it is used to control access to database by securing it.

DCL commands used to security purpose.
GRANT–this command used to give the pemissons to the paricular Data.
REVOKE–This command used to release the permissions, which already given to any user.
Examples: GRANT, REVOKE statements
TCL
TCL is abbreviation of Transactional Control Language. It is used to manage different transactions occurring within a database.
Examples: COMMIT, ROLLBACK statements

No comments:

Post a Comment