14 May 18 · npack · #teradata ·   Bookmark   ×

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

npack

posted on 14 May 18

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds

Copied