What is SQL( Structured Query Language ), Fundamentals of SQL

5:00:00 PM Rohit Kumar Verma 0 Comments

SQL(Structured Query Language)

            In 1970 E.F.Codd written a paper called as " Relational Model of Data for Large Shared Data Banks".
            In this paper E.F.Codd introduced DLS/ALPHA Language, which is used to operate relational database. Later IBM company System/R team introduced simplified version of dsl/Alpha called SQUARE. Again IBM changed SQUARE into SEQUEL(Structured English Query Language). Again IBM changed SEQUEL to SQL.

            SQL is a non-procedural language which is used to operate all relational databased.

In 1986-------------> ANSI Standard in SQL.
In 1987 ------------> ISO Standards of SQL.

ANSI/ISO----------> SQL89------->SQL89 or SQL1
ANSI/ISO----------> SQL92--------> SQL92
ANSI/ISO --------->SQL99--------->SQL99
ANSI/ISO---------->SQL2003------> SQL03

There are various tools available to write sql query like. SQLPLUS, Toad Tools, SQL Navigator, SQL Developer.

Fundamentals of SQL:-

1. Data Definition Language (DDL):


  • Create
  • Alter
  • Drop
  • Truncate
  • Rename(oracle 9i)
* Not used in PL/SQL.
* Rollback command will not work due to this commands are automatically committed.
* Using table keyword in most of the cases like
      1. create table table_name
      2. alter table table_name
      3. drop table table_name
      4. truncate table table_name
      5. But not in rename: rename table1 to newTable.

2. Data Manipulation Language(DML) :

  • Insert 
  • Update
  • Delete
  • Merge(Oracle 9i)
      * Can be used with PL/SQL.
      * First data is stored in buffers so rollback is possible.

3. Data Retrieval Language(DRL) or Data Query Language(DQL):

  • Select

4. Transaction Control Language(TCL):

  •  Commit
  • RollBack
  • Savepoint

5. Data Control Language(DCL):

  • Grant
  • Revoke