Re: How to drop column in a table

From: Ruud de Gunst <ruud_at_waubel.wau.mis.ah.nl>
Date: 1996/02/26
Message-ID: <DnDpxG.2oB_at_wau.mis.ah.nl>#1/1


rife_at_moffitt.usf.edu (Mike Rife) wrote:

>In article <4gk0mf$11p_at_sensible.teleord.co.uk>, marks_at_sensible.teleord.co.uk (Mark Styles) says:
>>
>><XTOWN> wrote:
>>>lovedog_at_gwis2.circ.gwu.edu wrote:
>>>>
>>>>...Now I want to drop three columns. I look thru all the >book.
>>>>It seems they dont' have a way to do that. If you have way to do
>>>>that, please give me a answer, otherwise, I have to drop whole table
>>>>and recreate it again...
>>>>
>>>I hate to tell you this but there's no easy way to do it other
>>>than re-creating the table.
>>
>>The other way to do this, which requires some extra free space, is to
>>create the new table as a different name, then selecting the required
>>data into the new table from the old table, dropping the old table
>>and renaming the new table.

>Don't forget to save all the grants on the original table and reissue
>them on the new table after it is renamed!!!!!

AND the PK/FK constraints and additional indexes, not to mention that all the foreign key constraints pointing at the original table have to be disabled. Synonyms are unaffected, but views referencing the original table will become invalid.

Good lick,
Ruud

+----------------------------------------------------------------------+
   __              __
  /  ) __  __     /  )      __		Name	: Ruud de Gunst
 /    /_  /  /   /    /  / /  / /  /		  Oracle DBA
/    /__ /__/   /    /_ / /__/ /_ /	E-Mail	: ruud_at_wau.mis.ah.nl
                               __/		  redrudy_at_knoware.nl
+----------------------------------------------------------------------+
Received on Mon Feb 26 1996 - 00:00:00 CET

Original text of this message