14 May 2018 · n-pacha ·       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

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

Copied