Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: how to alter table columns:
Rauno Seppanen <rauno.seppanen_at_icon.fi> wrote in message
news:nUjs3.268$yL6.809_at_read2.inet.fi...
>
> What do you think about updateing sys.col$ ?
> You need to flush (or shutdown and restart database)
> to see the change of the column. I did't once and it has worked fine.
>
> UPDATE sys.col$
> SET name = 'COMMISSION'
> WHERE obj# = (SELECT obj# FROM sys.obj$
> WHERE name = 'EMP'
> AND owner# = 8)
> AND name = 'COMM';
>
> 1 rows updated.
> SQL> commit
> 2 /
> Commit complete.
I think it's a evildoing.
I've heard about it and tested for a while.
Although you can see the column name changed when you issue "describe" command,
it does NOT mean that the internal data would be consistent.
In fact, what you did is to destroy the consistency of internal structure,
and may cause a disaster.
For example, to create a trigger about the "new" column name,
it may cause a internal error when Oracle trying to compile the trigger.
IMHO, after you do it, the only possible way to correct the inconsistency is
to restart Oracle immediately.
But it's NOT recommended.
Received on Fri Aug 13 1999 - 02:09:02 CDT