Sybase Alter Table

The Sybase Alter Table Tool allows users to visually alter tables. The Alter Table Tool can generate and/or execute the SQL that corresponds to any table alterations specified by the user.

The following options are available for the Sybase Alter Table Tool.

Add Column - Adds a column to a table
Add Primary Key - Adds a primary key to a table
Add Foreign Key - Adds a foreign key to a table
Add Constraint - Adds a check constraint to a table
Change Column Type - Changes the data type of a column
Drop Column - Drops a column from a table
Drop Constraint - Drops a check constraint from a table
Rename Table - Renames a table
Rename Column - Renames a column

Listed below are some sample SQL statements generated by the Alter Table Tool.

ALTER TABLE sample2.dbo.employee ADD newcol char(25) NOT NULL

ALTER TABLE sample2.dbo.employee ADD PRIMARY KEY (ssn)

ALTER TABLE sample2.dbo.employee
ADD FOREIGN KEY (ssn)
REFERENCES sample2.dbo.department(dnumber)

Sybase Alter Table