Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Copy table data from one schema to another scheman
On Mon, 14 Apr 2003 20:02:01 -0700, L1 wrote:
> Doggy Daddy <spamhole_at_nospam.org> wrote in message > news:<pan.2003.04.14.15.01.19.466406.15885_at_nospam.org>...
> > > So if I have 40 tables in Schema A, and wanna copy all 40 to schema B, > does that mean i have to write that CREATE TABLE script for each one of > those 40 tables and bundle them in a procedure? Is there any other easy > ways?
That's pretty much what you're faced with. If you have a lot of these tables, or you anticipate doing this frequently or for many schemas, then it might be worthwhile to write some PL/SQL to loop through the data dictionary and do the copies via dynamic SQL rather than hand-coding all the statements like a monk in a scriptorium.
That might also be an argument for abandoning the SQL approach and using export/import. Received on Tue Apr 15 2003 - 17:20:44 CDT
![]() |
![]() |