Create Table Statement - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

CREATE TABLE Statement

"Syntax Description of CREATE TABLE"
"Considerations for CREATE TABLE"
"Examples of CREATE TABLE"
The CREATE TABLE statement creates a Neoview SQL table. The CREATE VOLATILE TABLE
statement creates a Neoview SQL table in a SQL session. The CREATE TABLE AS statement
creates a table based on the data attributes of a SELECT query and populates the table using the
data returned by the SELECT query. A CREATE SET TABLE is like any other normal table with
the additional property of discarding duplicate rows. See
CREATE [SET][VOLATILE] TABLE table
{ table-spec | like-spec }
[NO PARTITION
|HASH PARTITION BY (partitioning-column, partitioning-column...)]
[STORE BY {PRIMARY KEY | (key-column-list)}]
[MAX TABLE SIZE megabytes]
[DISK POOL pool_number]
[ATTRIBUTE {NO INSERTLOG | INSERTLOG}]
[LOAD IF EXISTS | NO LOAD]
[AS select-query]
table-spec is:
(table-element [,table-element]...
table-element is:
column-definition
| [CONSTRAINT constraint-name] table-constraint
column-definition is:
column data-type
[DEFAULT default | NO DEFAULT
| identity-column-specification]
[[CONSTRAINT constraint-name] column-constraint]...
column-constraint is:
NOT NULL
| PRIMARY KEY [ASC[ENDING] | DESC[ENDING]]
| CHECK (condition)
| REFERENCES ref-spec NOT ENFORCED
column-list is:
column-name [,column-name]...
data-type is:
CHAR[ACTER] [(length [CHARACTERS])]
[CHARACTER SET char-set-name]
[UPSHIFT] [[NOT]CASESPECIFIC]
| CHAR[ACTER] VARYING (length [CHARACTERS])
| VARCHAR (length) [CHARACTER SET char-set-name]
| NCHAR (length) [CHARACTERS] [UPSHIFT] [[NOT]CASESPECIFIC]
| NCHAR VARYING(length [CHARACTERS]) [UPSHIFT] [[NOT] CASESPECIFIC]
| NUMERIC [(precision [,scale])] [SIGNED|UNSIGNED]
| SMALLINT [SIGNED|UNSIGNED]
| INT[EGER] [SIGNED|UNSIGNED]
| LARGEINT
| DEC[IMAL] [(precision [,scale])] [SIGNED|UNSIGNED]
| FLOAT [(precision)]
| REAL
| DOUBLE PRECISION
| DATE
| TIME [(time-precision)]
| TIMESTAMP [(timestamp-precision)]
| INTERVAL { start-field TO end-field | single-field }
72
SQL Statements
[CHARACTER SET char-set-name]
[UPSHIFT] [[NOT]CASESPECIFIC]
[UPSHIFT] [[NOT]CASESPECIFIC]
"Database Object Names" (page
242).

Advertisement

Table of Contents
loading

Table of Contents