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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Drop Field

Re: Drop Field

From: Winnie Liu <poohland_at_hotmail.com>
Date: Tue, 7 Jul 1998 20:21:07 -0700
Message-ID: <6nuob9$bpc@sjx-ixn6.ix.netcom.com>


Try to create a new table as selecting part of the columns from the old table:

CREATE TABLE <NEW TABLE> AS SELECT <COLA, COLB, .. COLN> FROM <OLD TABLE> If you want the new table to have the same name as the old table, then rename your old table first and then use that name to create the new table.

RENAME <OLD TABLENAME> TO <NEW TABLENAME>;

Then you can create another table with one (or a few less field).

Or you should consider creating a view by selecting only some of the columns from the tables.

Winnie Liu
DBA
Unihealth,CA

Bruger wrote in message <01bda89f$5c554340$4b6ea1bf_at_pc2596.DDNS>...
>Hi
>You canīt drop a field name !!! You have to drop and recreate the whole
>table...
>
>Arif Mohammed <arif_at_trec.ce.gatech.edu> skrev i artiklen
><359F2729.63FAE2E_at_trec.ce.gatech.edu>...
>> Does anyone know how to drop a field from an existing table in Sql.
>> I tried Alter - Alter table <table-name> drop <field-name>, but gives
>> error saying missing keyword at the field-name.
>>
>>
>>
Received on Tue Jul 07 1998 - 22:21:07 CDT

Original text of this message

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