Oracle Global Temporary Table - oracle tutorial - sql tutorial



Oracle global temporary table

Learn oracle - oracle tutorial - Oracle global temporary table - oracle examples - oracle programs

What is global temporary table in oracle ?

  • Temporary tables generally contain all of the features that ordinary tables have like triggers, join cardinality, information about rows and block etc.
  • the main difference is that the temporary tables can't have foreign keys related to other tables.
 process of global temporary tables

Syntax

CREATE GLOBAL TEMPORARY TABLE table_name 
( column1 datatype [ NULL | NOT NULL ],
 			 column2 datatype [ NULL | NOT NULL ],
  			...
 			 column_n datatype [ NULL | NOT NULL ]
);
click below button to copy the code. By - oracle tutorial - team

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)
);
click below button to copy the code. By - oracle tutorial - team
  • This will create a global temporary table called students

This tutorial provides an indepth knowledge on the following items such as oracle tutorial , sql tutorial , sql , pl sql tutorial , oracle , pl sql , mysql tutorial , sql tutorial for beginners , learn sql , oracle database tutorial , sql query tutorial , oracle dba tutorial , plsql tutorial , oracle tutorial pdf , oracle pl sql tutorial , oracle sql tutorial , sql tutorial point , oracle tutorial for beginners , learn oracle online free , learn oracle online , learning pl sql programming , learn sql online for free , sql learning online , dba oracle tutorial , oracle sql tutorial advanced , oracle 11g dba tutorial with examples , oracle online learning , oracle learning online , how to learn pl sql , sql coding tutorial , sql learning websites , sql basic learning

Related Searches to Oracle Global Temporary Table