Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements >

CREATE SCRATCH TABLE

Use the CREATE SCRATCH TABLE statement to create a non-logging temporary table in the current database. Only Extended Parallel Server supports this statement, which is an extension to the ANSI/ISO standard for SQL.

Syntax

Read syntax diagramSkip visual syntax diagram>>-CREATE--SCRATCH--TABLE--table-------------------------------->
 
>--| Scratch Table Definition |--------------------------------><
 
Scratch Table Definition:
 
      .-,--------------------------.
      V                       (1)  |
|--(----| Column Definition |------+--+-------------------------------------------------------+--)-->
                                      |    .-,----------------------------------------------. |
                                      |    V                                         (2)    | |
                                      '-,----+-| Multiple-Column Constraint Format |------+-+-'
                                             |                       (1)                  |
                                             '-| Column Definition |----------------------'
 
>--+---------------------------+--------------------------------|
   '-| Scratch Table Options |-'
 
Scratch Table Options:
 
|--+-------------------------------------+---------------------->
   '-IN--+-dbslice---------------------+-'
         +-dbspace---------------------+
         |                        (3)  |
         '-| FRAGMENT BY Clause |------'
 
>--+----------------------+-------------------------------------|
   |            .-PAGE--. |
   '-LOCK MODE--+-ROW---+-'
                '-TABLE-'
 
Notes:
  1. See Column Definition
  2. See Multiple-Column Constraint Format
  3. See FRAGMENT BY Clause
Element Description Restrictions Syntax
dbslice Name of dbslice to store table Must already exist Identifier
dbspace Name of dbspace to store table. Default is the dbspace that stores the current database. Must already exist Identifier
table Name that you declare here for a nonlogging temporary table Must be unique in the current session Database Object Name

Usage

The CREATE SCRATCH TABLE statement is a special case of the CREATE Temporary TABLE statement. For the complete syntax and semantics of the CREATE SCRATCH TABLE statement, see CREATE Temporary TABLE .

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]