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

Home -> Community -> Usenet -> c.d.o.server -> Re: Question about alter table

Re: Question about alter table

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 28 Nov 2001 13:18:45 +0100
Message-ID: <u09pv7ldffpb10@corp.supernews.com>


create a temporary table called temp_tableA including
the primary key of tableA
the affected column
now
insert into temp_tableA select pk_column, affected_column from tableA
commit
update tablea
set affected column = NULL
commit
alter table modify
update tablea
set affected column =
(select affected column
  from temp_tablea
 where temp_tablea.pk = tablea.pk)
/
commit

Hth

--
Sybrand Bakker
Senior Oracle DBA

to reply remove '-verwijderdit' from my e-mail address




"Hello_World" <nix1_at_cuse15.se.cuhk.edu.hk> wrote in message
news:9u1n7h$69b$1_at_eng-ser1.erg.cuhk.edu.hk...

> Saira Somani <saira_somani_at_yahoo.com> wrote:
> > ALTER TABLE table_name MODIFY column_name new_attributes;
>
> > so yours would look something like this:
>
> > ALTER TABLE tableA MODIFY (column1 number (10, 10));
>
> When I try to use
> ALTER TABLE tableName MODIFY cost number(10, 10);
> the following error occurs:
>
> ORA-01440: column to be modified must be empty to decrease precision or
> scale
>
> How can I solve this problem?
>
>
> > Cheers,
> > Saira
> > mailto:saira_somani_at_yahoo.com
>
> > "Hello_World" <nix1_at_cuse15.se.cuhk.edu.hk> wrote in message
> > news:9u0t3i$pea$1_at_eng-ser1.erg.cuhk.edu.hk...
> >> If I want to cahnge number(7,6) to number(10, 10)
> >> what is the SQL command?
> >>
> >> alter tableName XXXXXXXXX
> >> what is XXXXXXXX ?
>
>
>
>
Received on Wed Nov 28 2001 - 06:18:45 CST

Original text of this message

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