Monday 9 April 2012

Sql

RDBMS
 RDBMS stands for Relational Database Management System. RDBMS is the basis for SQL, and for all modern database systems such as MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft Access. The data in RDBMS is stored in database objects called tables. A table is a collection of related data entries and it consists of columns and rows.

SQL stands for Structured Query Language
It is divided into different categories as follows:

  1. DDL statements -Data Definition Language It is used to Retrive,Store,Modify,Delete,Insert,update data in database. 1) Create 2) Alter 3) Drop 
  2.  DML Statements.-Data Manipulation Languag It is used to create and modify the structure of database objects in database. 1) Insert 2) Update 3) Delete 4) select 
  3.  DCL statements-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. 1) GRANT 2) REVOKE 
  4. TCL-Transactional Control Language It is used to manage different transactions occurring within a database. 1) COMMIT 2) ROLLBACK 3) Save point 
  5. DQL-Data Query Language basicallu used for select data from table... 1) SELECT


CREATE TABLE


 Syntax


CREATE TABLE [schema.]tablename
          ( column datatype , 
            column datatype ,
            column datatype ,
            column datatype   )

                     


Example:
CREATE TABLE Student
     ( Name  VARCHAR2(30),
       StudentNumber NUMBER(4) ,
       Class NUMBER(4),
       Major VARCHAR2(4)
)




No comments:

Post a Comment