Copying data from one table to another on the same schema
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Copying data from one table to another on the same schema

  1. #1
    Join Date
    Dec 1999
    Posts
    217
    I am trying to duplicate a table in a user schema. Say I have an existing table XYZ on Scotts schema and I create a identical table to that XYZ_1 on Scotts schema. Now I need to copy the data from XYZ to XYZ_1. What are my options to do that? ANd what might the fastest way be, This is a huge table. Can this be done via export/import?
    ANy input would be greatly appreciated.

    Thanks,
    Chintz

  2. #2
    Join Date
    Apr 2001
    Posts
    107
    Hi,

    You can do a 'create table XYZ_1 as select * from XYZ;'
    It will copy table structures and data...

    Cheers

    Fabien

  3. #3
    Join Date
    May 2001
    Location
    San Francisco, California
    Posts
    510
    creata table as select..
    import/export -- potentially fast
    sql*plus copy -- this is slow
    Remember the Golden Rule - He who has the gold makes the rules!
    ===================
    Kris109
    Ph.D., OCP 8i, 9i, 10g, 11g DBA

  4. #4
    Join Date
    Feb 2001
    Posts
    290
    Kris,

    Now I am confused , I heard it either way...

    Let say my table size is 5GB and which will be better option.

    Thanks,
    Madhu

  5. #5
    Join Date
    Dec 1999
    Posts
    217
    Firstly, thanks for all your input.
    Also, the create table....as select * .... is faster than the import/export.

    Chintz

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width