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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: table create vs alter

Re: table create vs alter

From: Ron Rogers <RROGERS_at_galottery.org>
Date: Fri, 17 Aug 2001 10:30:48 -0700
Message-ID: <F001.0036F6E0.20010817103506@fatcity.com>

For all intensive purposes the table will be created the same. But, and someone with the ability to read the block data please check it out.

There are my own thoughts.... In method 1 the block data is set up to have 3 columns per table. In method 2 the table is set up to have 1 column and the data block info is set, Then another column is added and the data block info has to be changed. Simular to chaining inside the data block. I do not think that Oracle will remove the data block info and then recreate it when you add a column. If you had a large number of columns that would fill a block and the added a column, would the row be chained or migrated?
ROR mm

>>> guy.hammond_at_avt.co.uk 08/17/01 06:00AM >>> Hi,

Does anyone know if the end result of these two statements is actually any different?

CREATE TABLE mytable (

        mycol1 NUMBER,
        mycol2 VARCHAR2(40),
        mycol3 VARCHAR2(30));

and

CREATE TABLE mytable (

        mycol1 NUMBER);
ALTER TABLE mytable ADD (mycol2 VARCHAR2(40)); ALTER TABLE mytable ADD (mycol3 VARCHAR2(30));

Since no data is loaded, will Oracle have create the table in exactly the same way at the end of both two methods?

Thanks,

g

--

Guy Hammond
AVT Technologies
12-16 Westland Place
London N1 7LP UK

Email: guy.hammond_at_avt.co.uk
Office: +44 (0) 207 454 1224
Mobile: +44 (0) 7966 164687

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Guy Hammond
  INET: guy.hammond_at_avt.co.uk

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Ron Rogers
  INET: RROGERS_at_galottery.org

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Fri Aug 17 2001 - 12:30:48 CDT

Original text of this message

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