Re: copy table to another schema programatically

From: DA Morgan <damorgan_at_psoug.org>
Date: Sun, 20 Jan 2008 14:42:28 -0800
Message-ID: <4793CE54.70306@psoug.org>


mh_at_pixar.com wrote:
> DA Morgan <damorgan_at_psoug.org> 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 www.psoug.org.

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

Original text of this message