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

Home -> Community -> Usenet -> c.d.o.tools -> Re: create table as select ... with index (copy a table structure)

Re: create table as select ... with index (copy a table structure)

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Thu, 28 Dec 2000 10:14:01 -0000
Message-ID: <92f3pa$i54$1@soap.pipex.net>

Hi

The only reason that could possibly justify this proposed extension to the create table syntax is that of saving complexity for the dba. Getting the syntax for a number of tables with say 12 indexes on them would be somewhat prone to error. NB the original request cannot be to copy an existing index given the where clause on the create statement.

regards

--
Niall Litchfield
Oracle DBA
Audit Commission UK
<steveee_ca_at_my-deja.com> wrote in message
news:92e035$62i$1_at_nnrp1.deja.com...

> Hi,
>
> Bernhard or Sybrand,
> Can you clarify why you would set out to do this? Could you not just
> create the appropriate indexes on the new table? I'm asking because I'm
> wondering the circumstances that would precipitate trying to copy an
> index vs. creating a new one..
>
>
>
>
>
> In article <92d5cs$6qcol$1_at_ID-62141.news.dfncis.de>,
> "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote:
> > within your constraints: no
> > of course you could run Toad create the script for your source table
and
> > edit it to reflect the new table name, but I have a feeling that's
also too
> > much effort.
> > The only other solution looks like submitting an enhancement request.
> >
> > Regards,
> >
> > Sybrand Bakker, Oracle DBA
> >
> > "bernhard labus" <bernhard.labus_at_home.ins.de> wrote in message
> > news:3a4a0740$0$8780$4dbef881_at_businessnews.de.uu.net...
> > > Hello everybody
> > >
> > > it is easy to create a table B as copy of A (only structure, no
data):
> > > "create table B as select * from A where rownum=0;"
> > >
> > > **But** :
> > > with the statement above I get **no indices** for the new table B.
> > >
> > > ??
> > > Is it possible to create table B as copy of A with indices?
> > > Not wanted:
> > > - export-import / long statements
> > > Wanted:
> > > something *like* : "create table B as select * from A where rownum=0
> > > including indices"
> > >
> > >
> > >
> > >
> >
> >
>
>
> Sent via Deja.com
> http://www.deja.com/
Received on Thu Dec 28 2000 - 04:14:01 CST

Original text of this message

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