Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Changing column name in oracle?
Ok is it possible to drop a column from an Oracle table.
Jonathan Gennick <jonathan_at_gennick.com> wrote in message
news:us1bkscdbc93pnqtkt2khjli353sgi74ip_at_4ax.com...
> On Mon, 12 Jun 2000 15:34:33 -0700, "Sunny"
> <sunnyb_at_vendtek.bc.ca> wrote:
>
> >is it possible to change a table's column name
>
> No. What I've done in the past when i've needed to change a
> column name without recreating the table is:
>
> 1. Create new column with the name I want.
> 2. Create insert & update triggers to keep the new column in
> sync with the one it is replacing.
> 3. Execute an UPDATE statement to initialize the new column
> with data from the existing column.
> 4. Tell programmers to use the new column.
> 5. Eventually, when I get a window for downtime, rebuild the
> table.
>
> Of course, if you can just rebuild the table to start with,
> that's easier and probably less risky.
>
> Jonathan
>
> _____________________________________________________
> jonathan_at_gennick.com
> http://gennick.com
> Brighten the Corner Where You Are
Received on Tue Jun 13 2000 - 00:00:00 CDT