Re^2: How to delete a column?
From: Karl Regel <Karl_Regel_at_p3.f5840.n240.z2.fidonet.org>
Date: 1995/11/20
Message-ID: <MSGID_2=3A240=2F5840.3=40fidonet_be98e9ff_at_fidonet.org>#1/1
Date: 1995/11/20
Message-ID: <MSGID_2=3A240=2F5840.3=40fidonet_be98e9ff_at_fidonet.org>#1/1
+++ jim.gregory # DaytonOH.attgis.com_at_2:240/5889 +++ "Re: How to delete a column?"
jg> jg> e.g. create table b jg> <column list> jg> as select <columns > from table a; jg> jg> This will create your table ( less the column ) and load it from the old jg> table. Then drop table a and rename table b to table a.
But you'll be even more in trouble, if foreign key-constraints are engaged to keep your DB-design clean !
The VERY last solution is to save as much diskspace as possible and leave the column in the table :
- update table a set col_to_delete = NULL; COMMIT;
- alter table a modify ( col_to_delete varchar2(1));
And now, it nearly needs no more diskspace, while it's still existing.
Regards Karl
FIDO : 2:240/5840.3
MAIL : 100666.3450_at_compuserve.com
Received on Mon Nov 20 1995 - 00:00:00 CET