Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dropping multiple columns in Oracle

Tags:

sql

oracle

Is it possible to drop multiple columns in oracle 10g using a single query ?

like image 490
user3478885 Avatar asked Dec 04 '22 02:12

user3478885


1 Answers

How about this?

Physical Delete

To physically drop a column you can use one of the following syntaxes, depending on whether you wish to drop a single or multiple columns.

ALTER TABLE table_name DROP COLUMN column_name; --drop SINGLE column

ALTER TABLE table_name DROP (column_name1, column_name2); --drop MANY columns

Source

alter table
       table_name
    drop
       (col_name1, col_name2);  -- drop MANY columns
like image 198
Nitin Tripathi Avatar answered Dec 17 '22 22:12

Nitin Tripathi