CREATE GLOBAL TEMPORARY TABLE in Teradata
GTT is a temporary table used normally as a kind of "intermediate stage" for an SQL operation
CREATE MULTISET GLOBAL TEMPORARY TABLE DB.GTT_EMP_STATS ,NO FALLBACK, LOG
PRIMARY INDEX (deptno)
ON COMMIT PRESERVE ROWS;
- Global temporary table definition is stored in the data dictionary. so you only have to create it once and reuse it ever after
- Each instance of a global temporary table is local to a session
- Materialized tables are dropped automatically at the end of the session
- A user can materialize up to 2,000 global tables per session.
- COLLECTing STATISTICS is possible on Global Temporary tables
- Secondary indexes can be added to a Global Temporary tables
Read great educational content like this and a lot more !
Members get free exclusive access to content, new courses, and discounts. Signup for a free account to write a post / comment / upvote posts. Creating an account takes less than 5 seconds and you can start earning badges & points too