SQL/MX 3.1 Installation and Management Guide (H06.23+, J06.12+)
Adding, Altering, and Dropping SQL/MX Database
Objects
HP NonStop SQL/MX Release 3.1 Installation and Management Guide—663852-001
9-23
Altering SQL/MX Tables
cause similarly check to fail and force automatic recompilation. If they will, you
should SQL compile these modules after making the changes to avoid expensive
automatic recompilations at run time. SQL applications that are running while you
make these changes will still undergo automatic recompilation.
For information about explicit and automatic recompilation, see the
SQL/MX
Programming Manual for C and COBOL. For information about using DISPLAY
USE OF, see Checking Module Dependencies with DISPLAY USE OF
on
page 11-19 and the
SQL/MX Reference Manual.
4. Enter the CREATE TABLE statement to create a new table definition that contains
the new column attributes.
5. After creating the new table, load the old table’s data into the new table with
INSERT/SELECT statements.
6. After the loading the new table, drop the old table.
Adding Table Columns
See Adding Columns to an SQL/MX Table on page 9-5.
Dropping Table Columns
See Dropping Columns from an SQL/MX Table on page 9-28.
Altering Table Constraints
You cannot alter constraints, but you can change them by dropping an existing
constraint or by adding a new constraint to the table. Constraints reside in definition
only; therefore, they have no physical or security attributes to alter.
Adding a Table Constraint
See Adding Constraints on page 9-7.
Dropping a Table Constraint
See Dropping Constraints on page 9-29.
Altering Table File Attributes
To alter these physical file attributes of SQL/MX tables, use the ALTER TABLE
statement:
ALLOCATE/DEALLOCATE
AUDITCOMPRESS
CLEARONPURGE
MAXEXTENTS










