14 May 2018        Add to Favorites   Report

CREATE TABLE statement in Teradata

Here's a sample DDL to create a table

CREATE MULTISET TABLE dbname.Emp_Details, NO FALLBACK,
NO BEFORE JOURNAL,
NO AFTER JOURNAL,
CHECKSUM = DEFAULT,
DEFAULT MERGEBLOCKRATIO
(
EMP_ID INTEGER TITLE 'EMPLOYEE ID' NOT NULL COMPRESS ('NULL',0),
EMP_NAME VARCHAR(50) NOT NULL,
EMP_AGE SMALLINT NULL,
EMP_DOB DATE
)
PRIMARY INDEX PI_INDEX(EMP_ID);

SET vs MULTISET:

  • Set tables will load only unique records. Dupes will be ignored while loading
  • Multiset tables allows dupes
Copied