Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: how to alter table columns:

Re: how to alter table columns:

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Thu, 12 Aug 1999 15:42:03 +0100
Message-ID: <934469539.4295.0.nnrp-04.9e984b29@news.demon.co.uk>

This is what makes casual restructuring of the data very painful. You are quite right, of course, the new table has nothing to do with your original references. (Which is why I prefer to do everything with views). Since you were also asking about dropping the primary key anyway, I had assumed that such references would not be such a problem.

Thomas Kyte in one of his notes in this thread pointed out the main reason why
renaming a column is not a trivial problem: in particular, you may have written PL/SQL code which addresses the column by name - whilst Oracle could perhaps modify the tokenised version of the PL/SQL, full maintenance of integrity would require some sort of free-text search for the column name in the PL/SQL source code stored in the database ....

The problem of changing the name of a column is much larger, with many more side-effects, than you might think at first.

--

Jonathan Lewis
Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk

>
>I have a question regarding this strategy.
>What if the original table cmpd is being referenced in a number of other
>tables? As far as I know, the create as command does not propagate the
>references. And this necessarily means that we have to manually
>re-create all the references for the original cmpd table.
>
>By the way, does Oracle have some ideological reservations against
>providing a command for renaming a column...
Received on Thu Aug 12 1999 - 09:42:03 CDT

Original text of this message

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