Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Renaming column of CLOBs
On 8 Jun 2006 12:11:04 -0700, "Bruce C. Miller" <bm3719_at_gmail.com>
wrote:
>Sybrand Bakker wrote:
>> On 8 Jun 2006 10:27:43 -0700, "Bruce C. Miller" <bm3719_at_gmail.com>
>> wrote:
>>
>> >I have a table with a column of CLOBs that I want to rename. I can
>> >create the new column of CLOB type, but doing an UPDATE and SET on the
>> >new and old columns doesn't copy the data over properly. I guess I need
>> >to use the DBMS_LOB.COPY function, but I am not sure how to use this on
>> >a full column of data.
>> >
>> >Seems like a simple problem, but I haven't been able to find the answer
>> >online yet.
>>
>>
>> Why do you want to rename columns and does a view on top of the
>> affected table not suffice?
>
>Not in this case, no. The reason I want to rename the column is because
>there are new columns being added to the table and the old columnname
>in question is no longer specific enough to accurately describe its
>contents. It's not a big deal, but I'd like to keep things as nice and
>neat as possible.
Your description of your pressing need (which I frankly don't see), can be addressed by a view *quite* nicely and without problem.
If you want to keep things 'nice and neat' you have the application designed before you create any table, and if it has to change, you just face the consequences and learn to live with it. Applications ought to be *designed* not *hacked together*
-- Sybrand Bakker, Senior Oracle DBAReceived on Thu Jun 08 2006 - 14:25:56 CDT