Skip to content

CREATE TEMPORARY TABLESPACE

CREATE TEMPORARY TABLESPACE#

Syntax#

create_temporary_tablespace ::=#

create_temporary_tablespace

datafile_spec ::=#

datafile_spec

autoexetend_clause ::=#

autoextend_clause

Prerequisites#

Only the SYS user and users having the CREATE TABLESPACE system privilege can create temporary tablespaces.

Description#

This command is used to create a temporary tablespace for storing temporary results that are used only for the duration of a session. The temporary tablespace will be created in disk space. Data in temporary tablespaces are stored in data files.

To create a tablespace in which to store database objects permanently, use the CREATE DISK TABLESPACE statement.

tablespace_name#

This is used to specify the name of the temporary tablespace to be created. Refer to "Rules for Object Names" in Chapter 2 for more information on specifying names.

TEMPFILE datafile_space#

This clause is used to specify the temporary file(s) constituting the temporary tablespace.

Example#

<Query> Create the temporary tablespace temp_data, which is 5 MB in size and is constituted by the tbs.temp data file.

iSQL> CREATE TEMPORARY TABLESPACE temp_data
  TEMPFILE '/tmp/tbs.temp' SIZE 5M 
  AUTOEXTEND ON; 
Create success.