how to drop multiple columns at a time.. i tried with the following syntax "alter table <table_name> drop column <col_name1>, <col_name2>" but i am getting syntactical error.


This is the correct manner ( without column after drop):

alter table <table_name> drop <col_name1>, <col_name2>

hi akmozo, i have tried to drop multiple columns using your syntax. but i am getting error, as missing keyword.. the query is as below
" alter table sample drop empno,ename "

Hi again,

Sorry, I thought that you are speaking about mysql.

Try this with oracle :

alter table
   (empno, ename);

oh.. its ok.. i'l try and let u know.. thanq so much..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.