EasyManua.ls Logo

Sybase Adaptive Server Anywhere - Page 414

Sybase Adaptive Server Anywhere
1182 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
ALTER TABLE statement
396
MODIFY column-name [ NOT ] NULL Change the NOT NULL
constraint on the column to allow or disallow NULL values in the column.
MODIFY column-name CHECK NULL Delete the check constraint for
the column. This statement cannot be used on databases created before
version 5.0.
MODIFY column-name CHECK (condition) Replace the existing
CHECK condition for the column with the one specified. This statement
cannot be used on databases created before version 5.0.
DELETE column-name Delete the column from the table. If the column
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, …) Delete a uniqueness constraint for
this table. Any foreign keys referencing this uniqueness constraint (rather
than the primary key) will also be deleted.
DELETE PRIMARY KEY Delete the primary key constraint for this table.
All foreign keys referencing the primary key for this table will also be
deleted.
DELETE FOREIGN KEY role-name Delete the foreign key constraint for
this table with the given role name.
RENAME new-table-name Change the name of the table to new-table-
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 Change the name of
the column to the new-column-name. Note that any applications using the old
column name will need to be modified.
SQL/92 Intermediate level feature. MODIFY are not SQL/92
compliant.
Sybase Some clauses are supported by Adaptive Server Enterprise.
Add a new column to the
employee
table showing which office they
work in.
ALTER TABLE employee
ADD office CHAR(20) DEFAULT ’Boston’
Standards and
compatibility
Examples

Table of Contents

Related product manuals