Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Dropping columns in Oracle 7.3.4
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
![]() |
![]() |