Pages

Friday, 13 March 2015

SQL Commands



DDL, DML, DCL & TCL COMMANDS IN SQL


DDL

Data Definition Language (DDL) statements are used to define the database structure or schema. Some examples:
  • ·         CREATE - to create objects in the database
  • ·         ALTER - alters the structure of the database
  • ·         DROP - delete objects from the database
  • ·         TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed
  • ·         COMMENT - add comments to the data dictionary
  • ·         RENAME - rename an object

DML

     Data Manipulation Language (DML) statements are used for managing data within schema objects. Some examples: