Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: how to alter table columns:
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
![]() |
![]() |