Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle 8 SQL

Re: Oracle 8 SQL

From: Mark Gumbs <mgumbs_at_nospam.hotmail.com>
Date: Tue, 8 Jun 1999 10:37:09 +0100
Message-ID: <375ce1fe.0@145.227.194.253>


No easy way as far as i know.
You will need to create a temp table with the unique Id of the original table plus the column you want to update.

create table temp_table as
select <unique_id>, <field_to_be_changed> from table;

Delete all data in field

update <table>
set <field_to_be_changed> = null;

Change datatype

alter table <table>
modify <field_to_be_changed> varchar2(???);

Reload data back from temp table into field using a cursor loop of some sort.

HTH Mark

susanne mainz wrote in message <7jinfe$l2c$1_at_news.hamburg.pop.de>...
>Hi there,
>is there a possibility to delete a column's content from a table? I need
to
>change the datatype of this very column and I can't do so since there is
>already data in it...
>Susanne
>
>
Received on Tue Jun 08 1999 - 04:37:09 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US