Different types of Tables in Teradata:
Permenant Tables:
1. SET table - Strictly NO duplicate values [By-Default]
2. MULTISET table - Allows Duplicate Values.
Temporary Tables:
1. Global Temporary Table - supports [Compression in table],
when session logged out, Table persists and its record gets
vanished.
2. Volatile Table - When session logged out, TABLE and its
records are not available further.
Derived table: stores the derived result from a subquery.
It uses only spool space, so no table definition, permission needed.
simple query
select * from (select max(sal) from emp) DT (Max_sal)
answer:
derived table(DT) has Max salary and result would be
Max_sal- here subquery result is maintained in derived table
-------
25000
3. derived table auto drops after the query ends
No comments:
Post a Comment