SQL/MX 3.2 Reference Manual (H06.25+, J06.14+)

SQL/MX Statements
HP NonStop SQL/MX Release 3.2 Reference Manual691117-001
2-12
ALTER TABLE Statement
ALTER TABLE Statement
Considerations for ALTER TABLE
Examples of ALTER TABLE
The ALTER TABLE statement modifies an SQL/MX table by:
Adding a column to the table
Adding or dropping a constraint on the table
Changing one or more file attributes for the table
Renaming the table
ALTER TABLE table alter-action
alter-action is:
ADD [COLUMN] column-definition
| ADD [CONSTRAINT constraint] table-constraint
| DROP CONSTRAINT constraint [RESTRICT | CASCADE]
| ATTRIBUTE[S] attribute [,attribute]...
| RENAME TO new-table-object-name [CASCADE]
| ATTRIBUTE[S] attribute [,attribute]...
| ALTER COLUMN column_name recalibrate-option
| ALTER COLUMN column_name SET basic-sequence-generator-
option
column-definition is:
column-name data-type
[DEFAULT default]
[HEADING 'heading-string' | NO HEADING]
[[CONSTRAINT constraint] column-constraint]...
data-type is:
CHAR[ACTER] [(length)[CHARACTERS]]
[CHARACTER SET char-set-name] [COLLATE DEFAULT]
[UPSHIFT]
| PIC[TURE] X [(length)][CHARACTER SET char-set-name]