Re: how to clone a table?

From: <>
Date: Thu, 21 Aug 2008 14:01:36 -0700 (PDT)
Message-ID: <>

On Aug 21, 3:34 pm, wrote:
> I have a table MASTER_DEF_TBL and would like to replicate its
> definition (including constraints, indexes, comments, etc) to several
> tables such as MY_DEF_TBL and YOUR_DEF_TBL.
> What's the best way to do this?  Is there a table clone command,
> or some way to inherit from another table?
> Many TIA!
> Mark
> --
> Mark Harrison
> Pixar Animation Studios

I would start by extracting the relevant DDL using dbms_metadata.get_ddl, then modifying the resulting script. Yet another way is to export the table with rows=n then extract the DDL using imp ... indexfile=
then modifying that script for table names, etc.

As far as I know there isn't a 'clone table with constraints' command.

Others may have differing opinions. :D

David Fitzjarrell Received on Thu Aug 21 2008 - 16:01:36 CDT

Original text of this message