Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sat, 20 Dec 2003 @ 15:44:08 GMT


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


Subj:   Re: Suggestions for checking whether table exists or not
 
From:   Michael Larkins

Dheeraj:

If you need the table, then there is no need to drop it. Is your previous experience with Oracle where it is faster to drop and create a table?

This is not the case with Teradata. The fastest thing that Teradata does is delete all of the rows from a table. So, instead of dropping and creating (which involves the data dictionary via deletes and inserts) do: DELETE Table-name;

If it fails ERRORCODE > 0, then do your CREATE TABLE. If it works, you are ready to load the table with the needed rows.


Hope this helps,

Michael Larkins
Certified Teradata Master



     
  <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