Teradata - Tables



Tables in Relational model are defined as collection of data. They are represented as rows and columns.

Table Types

Types Teradata supports different types of tables.

  • Permanent Table − This is the default table and it contains data inserted by the user and stores the data permanently.

  • Volatile Table − The data inserted into a volatile table is retained only during the user session. The table and data is dropped at the end of the session. These tables are mainly used to hold the intermediate data during data transformation.

  • Global Temporary Table − The definition of Global Temporary table are persistent but the data in the table is deleted at the end of user session.

  • Derived Table − Derived table holds the intermediate results in a query. Their lifetime is within the query in which they are created, used and dropped.

Set Versus Multiset

Teradata classifies the tables as SET or MULTISET tables based on how the duplicate records are handled. A table defined as SET table doesn’t store the duplicate records, whereas the MULTISET table can store duplicate records.

Sr.No Table Commands & Description
1 Create Table

CREATE TABLE command is used to create tables in Teradata.

2 Alter Table

ALTER TABLE command is used to add or drop columns from an existing table.

3 Drop Table

DROP TABLE command is used to drop a table.

Advertisements