SQL/MX 2.x Reference Manual (H06.10+, J06.03+)
SQL/MX Statements
HP NonStop SQL/MX Reference Manual—544517-008
2-20
Considerations for ALTER TABLE
the column list associated with FOREIGN KEY. If column-list is omitted, the
referenced table’s PRIMARY KEY columns are the referenced columns.
A table can have an unlimited number of referential constraints and you can
specify the same foreign key in more than one referential constraint, but you must
define each referential constraint separately.
Publish/Subscribe's embedded update and embedded delete statements are not
allowed on tables with referential integrity constraints:
You cannot create self-referencing foreign key constraints. When a foreign key
constraint is added to an existing table, NonStop SQL/MX verifies that the data
does not violate the constraint. If it does, a message is returned indicating the
constraint was not created.
ATTRIBUTE[S] attribute [,attribute ]...
changes the values of file attributes for the table and its dependent indexes. You
can separate attributes with either a space or a comma. File attributes you can
specify are:
Unlike NonStop SQL/MP’s form of this statement, SQL/MX’s ALTER TABLE
statement has no PARTONLY clause. When you supply a new value for attributes,
ALTER TABLE modifies the value of the attribute on all partitions of the table. For
more detail, see the entry for a specific attribute.
Considerations for ALTER TABLE
You cannot use ALTER TABLE to change a partition’s name.
Effect of Adding a Column on View Definitions
The addition of a column to a table has no effect on existing 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 its schema or be the super ID. You must also have
access to all partitions of the table itself.
ALLOCATE/DEALLOCATE
on page 8-2
Controls amount of disk space allocated.
AUDITCOMPRESS on
page 8-3
Controls whether unchanged columns are included
in audit records.
CLEARONPURGE on
page 8-5
Controls disk erasure when table is dropped.
MAXEXTENTS on
page 8-7
Controls maximum disk space to be allocated.










