Sybase Adaptive Server Anywhere Reference page 414

Table of Contents

Advertisement

ALTER TABLE statement
Standards and
compatibility
Examples
396
MODIFY column-name [ NOT ] NULL
constraint on the column to allow or disallow NULL values in the column.
MODIFY column-name CHECK NULL
the column. This statement cannot be used on databases created before
version 5.0.
MODIFY column-name CHECK (condition)
CHECK condition for the column with the one specified. This statement
cannot be used on databases created before version 5.0.
DELETE column-name
is contained in any index, uniqueness constraint, foreign key, or primary key
then the index, constraint, or key must be deleted before the column can be
deleted. This does not delete CHECK constraints that refer to the column.
DELETE CHECK
Delete all check constraints for the table. This includes
both table check constraints and column check constraints.
DELETE UNIQUE (column-name, ...)
this table. Any foreign keys referencing this uniqueness constraint (rather
than the primary key) will also be deleted.
DELETE PRIMARY KEY
All foreign keys referencing the primary key for this table will also be
deleted.
DELETE FOREIGN KEY role-name
this table with the given role name.
RENAME new-table-name
name. Note that any applications using the old table name must be modified.
Foreign keys that were automatically assigned the old table name will not
change names.
RENAME column-name TO new-column-name
the column to the new-column-name. Note that any applications using the old
column name will need to be modified.
Intermediate level feature. MODIFY are not SQL/92
SQL/92
compliant.
Sybase
Some clauses are supported by Adaptive Server Enterprise.
Add a new column to the
work in.
ALTER TABLE employee
ADD office CHAR(20) DEFAULT 'Boston'
Change the NOT NULL
Delete the check constraint for
Replace the existing
Delete the column from the table. If the column
Delete a uniqueness constraint for
Delete the primary key constraint for this table.
Delete the foreign key constraint for
Change the name of the table to new-table-
employee
table showing which office they
Change the name of

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Adaptive Server Anywhere and is the answer not in the manual?

Questions and answers

Table of Contents