Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 03 Dec 2004 @ 18:17:18 GMT


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


Subj:   Re: Volatile /Temporary Tables in SQL
 
From:   Sappal, Neeraj

The following is an example of VT -

     CREATE VOLATILE TABLE vt_01 (emp_id VARCHAR(50), emp_dept VARCHAR(50))
     UNIQUE PRIMARY INDEX(emp_id)
     ON COMMIT PRESERVE ROWS;

     INSERT INTO vt_01 SELECT * FROM Employee_t;

     SELECT Emp_Dept FROM Dept_t D, vt_01 V WHERE D.emp_dept = V.emp_dept;

VT holds data till the session is live.

VT can be created in user's work space only.

VT can be useful to store aggregated data from tables for temp processing.

VT can be useful to break down the complex queries.

VT are used by lot of the Reporting tools to internally build SQL for databases to fetch data which included multiple levels of hierarchical drills.


Thanks.



     
  <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