Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 11 Jul 2003 @ 14:51:14 GMT


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


Subj:   Re: Another FastExport and FastLoad question (syntax)
 
From:   Fred W Pluebell

"Heying, Jerold G" wrote:

  If you are trying to duplicate a table within the same Teradata system, you can create the table and populate it with one simple DDL statement...  



Be careful!

CREATE TABLE t1 AS (SELECT * FROM t2) ...


defines columns to match the spool file, but it does NOT preserve other information about the original table - index definitions (not even PI), SET/MULTISET, etc.

If you want to copy a table, consider the even simpler form

CREATE TABLE t1 AS t2 WITH DATA;


Or do the CREATE "WITH NO DATA", then INSERT/SELECT with a WHERE clause to filter.



     
  <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