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: Copying table: data, structure, AND indexes

Re: Copying table: data, structure, AND indexes

From: Chuck Bayes <bayes_at_earthlink.net>
Date: 1997/07/24
Message-ID: <5r6be3$ts@argentina.earthlink.net>#1/1

I'm a Sybase DBA, and not familar with Oracle (yet).

I'd pull the data out of the system tables to reconstruct the table structure.  It is relatively easy to pull this info. For indexes, I'd use the "sp_helpindex <table_name>" stored procedure to extract the indexes (then awk/sed the file to create the "create index" scripts).

Hope this helps.

Chuck
chuck_bayes_at_hotmail.com

In article <5r48ov$4gg$2_at_news.smartt.com>, doknjas_at_netpointer.com (doknjas) wrote:
>How would you copy a table including its indexes? Currently, I use
> create table new_table as select * from old_table;
>but this only creates new_table with the same structure as old_table
>containing old_table's data. old_table's indexes are not created with
>new_table.
>
>Appreciate your thoughts on this. Please email me at:
>
>doknjas_at_netpointer.com
>
Received on Thu Jul 24 1997 - 00:00:00 CDT

Original text of this message

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