Re: table structural changes

From: Andrew Finkenstadt <andy_at_vistachrome.com>
Date: Sun, 21 Feb 1993 23:46:47 GMT
Message-ID: <C2topz.96K_at_vistachrome.com>


davids_at_Software.Mitel.COM (David So) writes (in part):
>2. we cannot change the name of a field (e.g. from name -> dept-name)
> I remembered that one suggestion is to manipulate the system catalog to
> achieve the goal. But it seems very dangerous. Any other ways?
>thanks/david

Well, as the guy who wrote that little article (did anyone keep a copy? I seem to have lost mine) I have performed this trick of skullduggery about 5 or 6 times since - the ONLY time I had trouble was when I forgot to shutdown/startup the database between modifications.

I have since talked with an Oracle Support technician afterhours at IOUW last year who told me some horror stories about how they'd have to go in and modify UET$ and FET$ (used and free extent tables) to fix some really ugly problems. Fascinating!  

If you have to rename a column in a table IN PLACE, then I know of no other way to do it. If you have the luxury of room enough to hold two copies of the table then you can just do a new CREATE TABLE and then an INSERT/SELECT.

-Andy

-- 
Andrew Finkenstadt, Vista-Chrome, Inc., Homes & Land Publishing Corporation
GEnie Unix RoundTable Manager, andy_at_vistachrome.com, andy_at_genie.geis.com.
"[The author] neither accidentally nor intentionally omits or includes 
anything that could support a preconceived thesis." - C&EN 21-DEC-92 p.72
Received on Mon Feb 22 1993 - 00:46:47 CET

Original text of this message