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: Dropping columns in Oracle 7.3.4

Re: Dropping columns in Oracle 7.3.4

From: <rungr_at_my-deja.com>
Date: Tue, 11 Jan 2000 18:38:07 GMT
Message-ID: <85ftad$f86$1@nnrp1.deja.com>


In article <8EB8981Cdlm_at_206.141.192.241>,   dmausner_at_ameritech.x.net (dave mausner) wrote:
> claire.moore_at_capgemini.co.uk (Claire Moore) wrote in
> <387A174B.574_at_capgemini.co.uk>:
>
> >A while back I saw a message from someone advising of a utility they
> >knew that could allow you to drop columns from a table without
>
> don't know of a utility program as such.
>
> you could export your tables and specify "rows=no" so that all the
> constraints are exported without the rows; then do the create table as
> select, eliminating the bad columns; rename the tables so the good
table
> has the original table name; then reload the export file with
> "ignore=yes". imp should complain about the pre-existance of the
table,
> but should load the constraints.
> --
> dave mausner
>

Dave;
Would the following sequence perform the same function? create table temp as (select * from target_table); drop table target_table cascade constraints; /*assumes no children*/ create table target_table (col1 varchar2(10), ... /*minus the column to be dropped */) as (select col1, col2, ... from temp); drop table temp;

If so, how would you do it if the target_table has children?

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Jan 11 2000 - 12:38:07 CST

Original text of this message

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