Considerations For Alter Table - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

new-name
specifies the new name of the object after the RENAME TO operation occurs.
CASCADE
specifies that indexes and constraints on the renamed object will be renamed.
sequence-generator options:
INCREMENT BY signed-numeric-literal
increments the current value to obtain the next value. Default is 1 (one). The INCREMENT
BY value cannot be greater than the maximum value of the data type of the IDENTITY column.
INCREMENT BY can not be zero (0) or less than zero. The INCREMENT BY and MAXVALUE
options can only be altered one at a time.
MAXVALUE signed-numeric-literal
minimum non-negative value of the data type of the IDENTITY column starting the cycle
range. The default is 0 (zero). Cannot be greater than the maximum value of the data type
of the IDENTITY column. Must be greater than the INCREMENT BY value. A numeric value
must be used for MAXVALUE.

Considerations for ALTER TABLE

Effect of Adding a Column on View Definitions
The addition of a column to a table has no effect on existing view or materialized view definitions.
Implicit column references specified by SELECT * in view definitions are replaced by explicit
column references when the definition clauses are originally evaluated.
Authorization and Availability Requirements
To alter a table, you must own the table, be the schema owner, or be granted the ALTER or
ALTER_TABLE privilege.
ALTER TABLE works only on user-created tables.
Altering the MAXVALUE and INCREMENT BY options on IDENTITY Columns
The following rules apply for altering IDENTITY columns:
You can alter the MAXVALUE or INCREMENT BY options only on IDENTITY columns.
The only options you can alter for an IDENTITY column are MAXVALUE or INCREMENT
BY.
Only one option, MAXVALUE or INCREMENT BY, can be altered at a time.
With regard to the INCREMENT BY option, the INCREMENT BY option cannot be 0 (zero), less
than 0 (zero), and cannot be greater than the maximum value of the data type of the IDENTITY
column.
With regard to the MAXVALUE option, a valid numeric value must be specified for the
MAXVALUE option. The MAXVALUE option cannot be 0 (zero), less than 0 (zero), and cannot
be greater than the maximum value of the data type of the IDENTITY column. In addition, the
MAXVALUE option must be greater than the current value of the IDENTITY column. The
MAXVALUE option cannot be less than the INCREMENT BY option.
Altering the MAXVALUE Setting on IDENTITY Columns
When the MAXVALUE maximum is reached for the IDENTITY column, an error is raised that
says the maximum has been exceeded. Values will not be restarted. If an artificially low cycle
range was created by having the MAXVALUE set to a value lower than the natural maximum
allowed for the data type, the ALTER TABLE ALTER COLUMN SET MAXVALUE option can
be used to raise the maximum, including up to the natural maximum allowed for the data type.
48
SQL Statements

Advertisement

Table of Contents
loading

Table of Contents