Restrictions For Disk Pool; Examples Of Create Table - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

By default, tables are assigned to disk pools in a round robin fashion.
The default number of partitions created are as many number of disks in a disk pool.
A non partitioned table can be created within a disk pool using the NO PARTITION clause.

Restrictions for DISK POOL

DISK POOL cannot be used with volatile tables, materialized views, indexes, and CREATE
TABLE LIKE.

Examples of CREATE TABLE

This example creates a table. The clustering key is the primary key.
CREATE TABLE SALES.ODETAIL
( ordernum
partnum
unit_price
qty_ordered
PRIMARY KEY (ordernum, partnum)
This example creates a table like the JOB table with the same constraints:
CREATE TABLE SAMDBCAT.PERSNL.JOB_CORPORATE
LIKE SAMDBCAT.PERSNL.JOB WITH CONSTRAINTS;
This example creates a volatile table:
CREATE VOLATILE TABLE vtable (a int);
This is an example of one-part name usage:
CREATE VOLATILE TABLE vtable(a int);
INSERT INTO vtable values(1);
SELECT * from vtable;
CREATE VOLATILE INDEX vindex on vtable(a);
DROP VOLATILE INDEX vindex;
DROP VOLATILE TABLE vtable;
This is an example of two-part name usage:
CREATE VOLATILE TABLE "mysch".vtable(a int);
INSERT INTO mysch.vtable values(1);
SELECT * from mysch.vtable;
CREATE VOLATILE INDEX vindex on mysch.vtable(a);
DROP VOLATILE INDEX vindex;
DROP VOLATILE TABLE mysch.vtable;
Example of DISK POOL usage. For a system with 256 processors and 2 disks per processor,
the default number of pools is 2. Each pool contains 256 disks. T1 is created with 256 partitions
and assigned to a random disk pool.
CREATE TABLE t1 (a int not null, primary key(a));
Example of DISK POOL usage. Example of DISK POOL usage. For a system with 256
processors and 2 disks per processor, the default number of pools is 2. Each pool contains
256 disksT2 is created with 256 partitions and allocated to the disk in disk pool 2.
CREATE TABLE t2 (a int not null, primary key(a)) DISK POOL 2;
Example of ALIGNED format usage:
CREATE TABLE t157t02 (c int not null constraint t157t02_1 unique)
no partition
attribute blocksize 4096, aligned format;
This is an example of NOT CASESPECIFIC usage:
CREATE TABLE T (a char(10) NOT CASESPECIFIC,
b char(10));
INSERT INTO T values ('a', "a");
78
SQL Statements
NUMERIC (6) UNSIGNED
NUMERIC (4) UNSIGNED
NUMERIC (8,2)
NUMERIC (5) UNSIGNED
NO DEFAULT
NOT NULL,
NO DEFAULT
NOT NULL,
NO DEFAULT
NOT NULL,
NO DEFAULT
NOT NULL,
);

Advertisement

Table of Contents
loading

Table of Contents