|
 |
|
Oracle "alter
table" drop column
Syntax example
Oracle Tips by Burleson Consulting |
You can use the Oracle “alter table” syntax to
drop any column from a table, as shown in this example:
alter
table
table_name
drop
column
col_name1; -- drop ONE column
alter
table
table_name
drop
(col_name1, col_name2); -- drop MANY columns
We have "alter table" syntax to drop
multiple data columns in-place in this form:
alter table
table_name
drop
(column_name_list)
;
Here are some examples of Oracle "alter table"
syntax to drop data columns.
alter table
cust_table
drop column
cust_sex;
Remember, when you
drop a table column the column space remains used inside the data
blocks and you may want to reorganize the table (using the
dbms_redefinition package) to reclaim the free spaced from the
dropped table column.
|