Considerations For Create Table - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

The PRIMARY KEY value in each row of the table must be unique within the table. Columns
within a PRIMARY KEY cannot contain nulls. A PRIMARY KEY defined for a set of columns
implies that the column values are unique and not null. You can specify PRIMARY KEY only
once on any CREATE TABLE statement.
Neoview SQL uses the primary key as the clustering key of the table in order to avoid creating
a separate, unique index to implement the primary key constraint.
If you do not specify a PRIMARY KEY constraint, Neoview SQL cannot implement the
primary key as the clustering key.
CHECK (condition)
is a constraint that specifies a condition that must be satisfied for each row in the table. See
"Search Condition" (page
Neoview SQL checks the condition whenever an operation occurs that might affect its value.
The operation is allowed if the predicate in the condition evaluates to TRUE or null but
prohibited if the predicate evaluates to FALSE.
You cannot refer to the CURRENT_DATE, CURRENT_TIME, or CURRENT_TIMESTAMP
function in a CHECK constraint, and you cannot use subqueries in a CHECK constraint.
CHECK constraints cannot contain non-ISO88591 string literals.
NOT CASESPECIFIC
is a column constraint that specifies that the column contains strings that are not case specific.
The default is CASESPECIFIC. Comparison between two values is done in a case insensitive
way only if both are case insensitive. This applies to comparison in a binary predicate, LIKE
predicate, and POSITION/REPLACE string function searches. See
TABLE" (page
LIKE source-table [include-option]...
directs Neoview SQL to create a table like the existing table, source-table, omitting
constraints (with the exception of the NOT NULL and PRIMARY KEY constraints), and
partitions unless include-option clauses are specified.
source-table
is the ANSI logical name for the existing table and must be unique among names of tables,
views, and procedures within its schema.
The include-option clauses are specified as:
WITH CONSTRAINTS
directs Neoview SQL to use constraints from source-table. Constraint names for
table are randomly generated unique names.
When you perform a CREATE TABLE LIKE, whether or not you include the WITH
CONSTRAINTS clause, the target table will have all the NOT NULL column constraints
that exist for the source table with different constraint names.
WITH PARTITIONS
directs Neoview SQL to use partition definitions from source-table. Each new table
partition resides on the same volume as its original source-table counterpart. The
new table partitions do not inherit partition names from the original table. Instead,
Neoview SQL generates new names based on the physical file location.
If you specify the LIKE clause and the PARTITION file-option, you cannot specify
WITH PARTITIONS.

Considerations for CREATE TABLE

You can create partitioned and non-partitioned tables. To create a non-partitioned table, specify
the NO PARTITION option with the CREATE TABLE command.
248).
78).
"Examples of CREATE
CREATE TABLE Statement
73

Advertisement

Table of Contents
loading

Table of Contents