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 -> Which is the fast way to add a column with a value?

Which is the fast way to add a column with a value?

From: Luis Santos <lsantos_at_pobox.com>
Date: Wed, 07 Feb 2001 18:23:29 GMT
Message-ID: <95s3qj$rbp$1@nnrp1.deja.com>

   Hi,

   We have to add a column to a partitioned table. The table is over 12G in size, divided in 12 partiotion, of similar value (1G).

   The column must contain the value 'N' on it.

   We have limited rollback space.

   If we use a PL/SQL similiar to

   for reg in (select rowid from tab) loop

       update tab set new_column-'N' where rowid=reg.rowid
       (commit at each 20000 lines)

   end loop;

   the PL runs for days...

   Can we use ALTER TABLE tab ADD new_column char(1) default 'N'?

   Will this use rollback segment, as it is a DDL command?

--
   Luis Santos
   Oracle DBA


Sent via Deja.com
http://www.deja.com/
Received on Wed Feb 07 2001 - 12:23:29 CST

Original text of this message

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