Re: How to drop column in a table

From: Jeffrey S. McFarlane <jeffmc_at_shellus.com>
Date: 1996/02/23
Message-ID: <Dn8yHu.DJs_at_shellgate.shell.com>#1/1


In article <4gjbue$g9p_at_cronkite.seas.gwu.edu>, lovedog_at_gwis2.circ.gwu.edu says...
>
>I have simple question, it seems it's hard to answer. I have a very large
>table (150 columns). 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 do give me a answer, other wise, I have to drop whole table
>and recreate it again. That's a really tedious procedure. Many thanks in
>advance. Any suggestion is welcome. S.C.
>
>

An alternate is the following:

  • rename the table
  • alter the 3 columns to allow nulls
  • optionally update 3 columns and set them to null
  • create view named with the original table name selecting all but the 3 columns
  • applications/clients remove references to the 3 columns
  • applications/clients will reference the original object name which now is a view

good luck.

Jeff

-- 
Jeffrey S. McFarlane   Oracle DBA     Shell Services Company
http://www.lookup.com/Homepages/71915/home.html
mailto:jeffmc_at_shellus.com
Received on Fri Feb 23 1996 - 00:00:00 CET

Original text of this message