ORACLE | ||||||||
| ||||||||
| ||||||||
| ||||||||
| ||||||||
| ||||||||
| ||||||||
| ||||||||
|
Oracle - Global Temporary Tables
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.
CREATE GLOBAL TEMPORARY TABLE table_name
( column1 datatype [ NULL | NOT NULL ],
column2 datatype [ NULL | NOT NULL ],
...
column_n datatype [ NULL | NOT NULL ]
);
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