Previous Topic

Next Topic

Alter Table

Valid in: SQL, ESQL

The ALTER TABLE statement adds or removes a table-level constraint or a column from a base table.

The statement also modifies the character columns in a table to Unicode column types.

Constraints can also be specified when the base table is created using the CREATE TABLE statement.

Note: To use this statement, the table must have a page size of 4K or larger.

Previous Topic

Next Topic

Syntax

The Alter Table statement has the following format:

[EXEC SQL] ALTER TABLE [schema.]table_name

ADD [column] column_name FORMAT [default_clause]

       [null_clause] [column_constraint] [COLLATE collation_name]

| DROP [COLUMN] column_name RESTRICT | CASCADE

| ADD [CONSTRAINT constraint_name] constraint_spec

| DROP CONSTRAINT constraint_name RESTRICT | CASCADE

| ALTER [COLUMN] column_name FORMAT [default_clause]

        [null_clause] [column_constraint] [COLLATE collation_name]


© 2007 Ingres Corporation. All rights reserved.