Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Move selected tables
select 'create table newuser'||'.'||table_name||' as select * from
'||owner||'.'||table_name||';'
from dba_tables
where table_name like 'abc%';
Will give you some dynamic sql to do the creates. A similar statement would do the drops for the original tables afterwards assuming you have space for both.
Allan
-----Original Message-----
Sent: Monday, August 04, 2003 11:14 AM
To: Multiple recipients of list ORACLE-L
I need to move selected tables from one schema to another schema within the same database. The tables I need to move all start with the same prefix (abc_sometablename). Say there are 200 tables out of 1000 that I want to move. Is there an easy way to do this?
Thanks!
Ron
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Smith, Ron L.
INET: rlsmith_at_kmg.com
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Nelson, Allan
INET: anelson_at_midf.com
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Mon Aug 04 2003 - 11:34:36 CDT
![]() |
![]() |