Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: what's the impact of this
If it is a very large and very busy table you'd best think twice.
Every row in the table will be updated. See example below.
SQL> desc g1
Name Null? Type ------------------------------- -------- ---- ID NOT NULL NUMBER VAL NUMBER LASTCHANGE DATE
SQL> select * from g1;
ID VAL LASTCHANGE
---------- ---------- -----------
1 4 2 5
SQL> alter table g1 add(test number default 5);
Table altered.
SQL> select * from g1;
ID VAL LASTCHANGE TEST ---------- ---------- ----------- ----------
1 4 5 2 5 5 SQL> desc g1 Name Null? Type ------------------------------- -------- ---- ID NOT NULL NUMBER VAL NUMBER LASTCHANGE DATE TEST NUMBER
Gene Hubert
Durham, NC
blah_at_blah.com (blah) wrote in message news:<9m4m0s$8uc1_at_inetbws1.citec.com.au>...
> Hi All,
>
> Could someone discribe the possible impact/impacts of running this sql against
> a busy production database.
>
> alter table customer
> add(deleted varchar2(1) default 'N');
>
> Thanks,
> Chris
Received on Fri Aug 24 2001 - 07:04:08 CDT