Thursday, 4 October 2012

Lesson -5 SQL command types


Lesson – 5 :   SQL  (Structured Query Language)

 

SQL is a set of commands or statements used to access ,manipulate data in the Oracle database.

SQL can be divided in to three following categories,

1)      DDL (Data Definition Language) Commands used to define the database structure or any database objects or modifying the structure of any database object.:

  • CREATE - To create objects,like table,view etc in the database
  • ALTER – To modify the structure of any existing objects in the database
  • DROP -  To delete any existing objects from the database

2)      DML (Data Manipulation Language) :  Statements used for managing data within schema objects. 

  • SELECT – To  retrieve data from database table or view
  • INSERT -  To insert data into a table
  • UPDATE – To update existing data within a table
  • DELETE – To deletes all records from a table

3)      TCL  (Transaction Control Language) : Statements used to control transactions. 

  • COMMIT – To save the data permanently in the database
  • SAVEPOINT -  To identify a point in a transaction to which you can later roll back
  • ROLLBACK – To  undo the modification I made since the last COMMIT

No comments:

Post a Comment