Re: copy table to another schema programatically

From: DA Morgan <>
Date: Sun, 20 Jan 2008 14:42:28 -0800
Message-ID: <> wrote:
> DA Morgan <> wrote:

>> Sean Nakasone wrote:
>>> anyone have code snippets that copy a table from one schema to another?  
>>> i usually use toad to do this but i really would like to find more 
>>> automated way.
>> CREATE TABLE new_table AS
>> SELECT * FROM schema_name.existing_table;

> If we wanted to do this with several tables, would we have
> any issues with relationship integrity?

No ... no ... and no. <g> This is just not true.

Please reread my posts to you. Note that I refer to using deferrable constraints. Create your constraints correctly and the issue disappears.

If you are not familiar with deferrable constraints look them up in the Oracle docs at tahiti or in my demos library (Morgan's Library) at

Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington (replace x with u to respond)
Puget Sound Oracle Users Group
Received on Sun Jan 20 2008 - 16:42:28 CST

Original text of this message