Pages

Search This Blog ...

Wednesday, April 27, 2016

Alter Table in Oracle

  1. Create Table 
  2. Alter Table
In this second tutorial i'll be explain how to manage created table

     2. Alter Table
             Here there are many way to manage created table.
             Using this statement you can change the table's column, name of column as well as table,
      change the constraint, datatype, etc.
             The table must be in your own schema, or you must have ALTER object privilege on the table, or you must have ALTER ANY TABLE system privilege.

        Syntax :
ALTER TABLE table_nm [ ADD (column1 datatype constraint,..,columnn datatype constraint) | 
MODIFY (column1 datatype constraint,..,columnn datatype )  | 
DROP COLUMN   column_name  | 
RENAME COLUMN column_name TO new_name  ]  ;

Tuesday, April 26, 2016

How to Create Table in Oracle

In this tutorial i'll show you many different type to manage and create the table.
  1. Create Table 
  2. Alter Table
 1. Create Table
      Table is basic storage unite of data, and oracle table can store data in row column format.     
      Using this statement you can create table in oracle.
      Before you create table you must have CREATE TABLE system privilege, and one more think
you he owner of the table must have a quota for the tablespace that contains the table, or the UNLIMITED TABLESPACE system privilege.

  Syntax :
 CREATE TABLE tbl_name
  (
   ColumnName1 Datatype [Constraint],
   ColumnName2 Datatype [Constraint],
   .
   .
   .
   ColumnNamen Datatype [Constraint]
  );