Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Which is the fast way to add a column with a value?
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)
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