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.

Hi,

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
   sample
drop
   (empno, ename);

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

hey thanq akmozo.. it is working :)

Be a part of the DaniWeb community

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