Drop a column from an existing table using:
alter table table_name drop column_name [, column_name]
Where:
table_name is the table that contains the column you are dropping.
column_name is the column you are dropping.
You can drop any number of columns using a single alter table statement. However, you cannot drop the last remaining column from a table (for example, if you drop four columns from a five-column table, you cannot then drop the remaining column).
For example, to drop the advance and the contract columns from the titles table:
alter table titles drop advance, contract
alter table rebuilds all indexes on the table when it drops a column.
Copyright © 2005. Sybase Inc. All rights reserved. |