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: Where is a temp tables DDL stored?

Re: Where is a temp tables DDL stored?

From: Ed Prochak <ed.prochak_at_magicinterface.com>
Date: 19 Sep 2005 11:02:15 -0700
Message-ID: <1127152935.283980.15370@g14g2000cwa.googlegroups.com>

mikharakiri_nosp..._at_yahoo.com wrote:
> Jonathan Lewis wrote:
> > Just playing devil's advocate, but why couldn't
> > the database reverse engineer the corrected
> > DDL from the data dictionary as the dictionary
> > is updated ?
>
> To extend this idea further, I always wondered why the concept of DDL
> is needed at all? Consider
>
> -- create 100 tables TEST1...TEST100
> insert into user_tables -- or, more concervatively, tab$
> as select 'TEST'||rownum table_name, ...
> from dual connect by rownum < 100
>
> insert into user_tab_columns -- or, more concervatively, col$
> ...
>
> commit;

I'd say its the side-effect issue. With the above approach, you insert into one table and Voila a new table exists.

But also note: using that method you can "create" a table with NO columns. And what about the other side effects of CREATE TABLE: allocating space, granting permissions, etc.?

So direct inserts in the Data dictionary table are not a great idea, even if that is what the DBMS does in the background.

ed Received on Mon Sep 19 2005 - 13:02:15 CDT

Original text of this message

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