Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 16 Jan 2003 @ 14:59:14 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: How to seperate tables?
 
From:   Raghav Vaidya

Try this:

1). CREATE PARENT_DB (if you need to create a new one)

2). CREATE TBL_DB1 FROM PARENT_DB
    CREATE TBL_DB2 FROM PARENT_DB
    CREATE TBL_DB3 FROM PARENT_DB

3). To copy tables and data, you have 2 options, one is to create the 135 tables in the 3 new databases as required and individually do a SELECT/INSERT (very efficient on empty tables) . You can use CREATE TABLE AS ...WITH NO DATA to copy the DDLs.

OR

Use CREATE TABLE TBL_DB1.tablename AS oldtablename WITH DATA...(easiest, depending on the volume, very efficient)

Additional space will be required to store the new tables, whichever option you choose. If your source tables have triggers, they will not be copied over to the new table with a CREATE TABLE AS. You can always use ALTER TABLE to add them later.


God Luck !.

Raghav



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023