...

Database Managment - Oracle

Back to Course

Lesson Description


Lession - #1409 Oracle Global Temporary tables


Oracle Global Temporary tables

Transitory tables for the most part contain each of the highlights that normal tables have like triggers, join cardinality, data about lines and block and so on the principal contrast is that the impermanent tables can't have unfamiliar keys connected with different tables.
Syntax

CREATE GLOBAL TEMPORARY TABLE table_name  
( column1 datatype [ NULL | NOT NULL ],  
  column2 datatype [ NULL | NOT NULL ],  
  ...  
  column_n datatype [ NULL | NOT NULL ]  
>
;

Parameters table_name: The parameter table_name specifies the global temporary table that you want to create. column1, column2, ... column_ n: It specifies the column that you want create in the global temporary table. Every column must have a datatype and should be defined as NULL or NOTNULL. If the value is left blank, it is by default treated as NULL.

Example The following example specifies how to create a global temporary table


CREATE GLOBAL TEMPORARY TABLE students  
( student_id numeric(10>
NOT NULL, student_name varchar2(50>
NOT NULL, student_address varchar2(50>
>
;


 This will create a global temporary table called students