5.4.4. RECREATE TABLE
Used for
creating a new table (relation) or recreating an existing one
Available in
DSQL
Syntax
RECREATE [GLOBAL TEMPORARY] TABLE tablename
[EXTERNAL [FILE] 'filespec']
(<col_def> [, {<col_def> | <tconstraint>} ...])
[ON COMMIT {DELETE | PRESERVE} ROWS]
See the CREATE TABLE
section for the full syntax of CREATE TABLE
and descriptions of defining tables, columns and constraints.
RECREATE TABLE
creates or recreates a table. If a table with this name already exists, the RECREATE TABLE
statement will try to drop it and create a new one. Existing dependencies will prevent the statement from executing.
Example
Creating or recreating the COUNTRY
table.
RECREATE TABLE COUNTRY (
COUNTRY COUNTRYNAME NOT NULL PRIMARY KEY,
CURRENCY VARCHAR(10) NOT NULL
);
See also