|
Archives of the TeradataForumMessage Posted: Fri, 03 Dec 2004 @ 18:17:18 GMT
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.
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||