Books
in black and white
Main menu
Share a book About us Home
Books
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics
Ads

Teradata RDBMS forUNIX SQL Reference - NCR

NCR Teradata RDBMS forUNIX SQL Reference - NCR, 1997. - 913 p.
Download (direct link): teradataforunix1997.pdf
Previous << 1 .. 104 105 106 107 108 109 < 110 > 111 112 113 114 115 116 .. 241 >> Next

FREESPACE integer PERCENT Used to set the percent of free space that will remain on a cylinder during loading operations.
DEFAULT FREESPACE Specifies the change of value of the percent freespace attribute to the specified value integer or to the unspecified value, as in the case of the CREATE TABLE statement. The old attribute value is discarded. This does not have any immediate effect on existing cylinders, but the new attribute value will control the subsequent allocation of blocks on cylinders. If the specified value does not fall within the allowable range (0 to 75 percent), an error message is generated, as with the CREATE TABLE statement. See the “CREATE TABLE” statement for more details.

Data Block Size Option

integer Numeric constant specifying the data block size.
DATABLOCKSIZE = integer BYTES DATABLOCKSIZE = integer KBYTES DATABLOCKSIZE = integer KILOBYTES Changes the value of the data block size attribute to the value integer. (The old attribute value is discarded.) The calculation is made in the same manner as in the case of the CREATE TABLE statement.
IMMEDIATE If the IMMEDIATE option is included, the attribute value will still be changed, but, in addition, the rows in all existing data blocks are repacked into data blocks of the specified size. If the IMMEDIATE option is not included, existing data blocks are left unmodified. In both cases, the new attribute value will determine the maximum size of multiple-row data blocks subsequently modified or allocated. If the computed attribute value does not fall within the allowable range, an error message is generated, as with the CREATE TABLE statement. See the “CREATE TABLE” statement for more details.

8-10

Teradata RDBMS for UNIX SQL Reference
Teradata SQL Syntax Guide

ALTER TABLE

Syntax Element... Description
DEFAULT DATABLOCKSIZE Specifying the DEFAULT DATABLOCKSIZE option when the data block size has been previously specified to be a size other than the default size resets the size to the default size. This is the same as the maximum size, i.e. 63 sectors (each sector is 512 bytes).
MINIMUM DATABLOCKSIZE The minimum DATABLOCKSIZE is 12 sectors, where each sector is 512 bytes i.e. the minimum is 6,144 bytes. See the discussion of MINUMUM or MAXIMUM DATABLOCKSIZE for the “CREATE TABLE” statement.
MAXIMUM DATABLOCKSIZE The maximum DATABLOCKSIZE is 63 sectors, where each sector is 512 bytes, i.e. the maximum is 32,256 bytes. This is the same as the default DATABLOCKSIZE. See the discussion of MINUMUM or MAXIMUM DATABLOCKSIZE for the “CREATE TABLE” statement.

Column Change Options

ADD col_name type definition, type attributes, column storage attribute, or column constraint attribute ADD . . . or DROP . . . cannot both be specified on the same column with the same “ALTER TABLE” statement. The ADD keyword either changes the definition of an existing column or adds a new column to the table. If the named column already exists, ADD indicates that its attributes are to be changed. See Chapter 5, Table 5-2 and Table 5-1 for listings of allowed type attributes and definitions. Column storage and constraints attributes are listed in Chapter 5. If the named column does not exist, ADD indicates that it is to be added to the table. New columns that are to be compressed should be defined in the order that achieves maximum accessibility (see Usage Notes). col_name specifies the name of a column whose attributes are to be changed or that is to be added or dropped.
ADD col_name NULL Not supported by ANSI SQL. This is used to change an existing column col_name from being NOT NULL to being nullable.
DROP col_name Indication that the named column is to be removed from the table.

Teradata RDBMS for UNIX SQL Reference

8-11
Teradata SQL Syntax Guide

ALTER TABLE

Syntax Element...

Description

Constraint Change Options

ADD/DROP CONSTRAINT name FOREIGN KEY (col_name list) REFERENCES tname col_name Constraint names are not supported by Entry Level ANSI SQL and are flagged when the SQL flagger is enabled. ANSI SQL allows the adding and dropping of constraints only.
DROP INCONSISTENT REFERENCES ANSI SQL does not allow DROP INCONSISTENT REFERENCES, when used it is flagged if the SQL flagger is enabled This statement is commonly used after a restore, when the AFTER TABLE DROP FOREIGN KEY might not work. This statement will delete all inconsistent references defined on the table.
ADD CHECK (boolean condition) ADD col_name CHECK (boolean condition) ADD CONSTRAINT name CHECK (boolean condition) Constraint names are not supported by Entry Level ANSI SQL. They are only allowed if col_name does not already possess a constraint. When a constraint is added or modified, all existing rows of the table are accessed to validate that the current values conform to the specified search condition. If not, an error is returned and no change is made to the table definition.
DROP CHECK DROP col_name CHECK DROP CONSTRAINT name CHECK Drops all unnamed column-level CHECK constraints on col_name. DROP CHECK will drop the unnamed table-level constraints on the table. DROP CONSTRAINT name CHECK or DROP CONSTRAINT name, will drop a named table-level CHECK constraint on the table.
Previous << 1 .. 104 105 106 107 108 109 < 110 > 111 112 113 114 115 116 .. 241 >> Next