Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to drop a column????

Re: How to drop a column????

From: <mandrew_at_my-dejanews.com>
Date: Mon, 01 Jun 1998 13:07:13 GMT
Message-ID: <6ku921$qhi$1@nnrp1.dejanews.com>


In article <01bd8a10$a027bab0$0b00a8c0_at_ntserver>,   "Paolo Quaglia" <paolo_at_sitek.it> wrote:
>
> Hi I'm a new user of ORACLE 8 .
> I came from other DB server expaerience.
> In SQL to drop a column from a table I used
>
> ALTER TABLE name_table DROP COLUMN name_of_ column;
>
> In ORACLE SQL this expression is not recognized
> I have read the SQL manual but I have not found the solution
>
> HELP me
> Ciao
>

There is no command to drop column. An easy way to accomplish this is : RENAME old_table_name TO new_table_name CREATE TABLE old_table_name (old_column_name1, old_column_name2) -- that is where you exclude the column you want to drop INSERT INTO old_table_name SELECT new_column_name1, new_column_name2 FROM new_table_name; DROP new_table_name -- don't forget the constraints, indexes sizing and tablespace info. Hope this helps

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Mon Jun 01 1998 - 08:07:13 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US