Primary index is
used to distribute the data on all the AMP’s.
While creating
table, PRIMARY INDEX is mandatory in Teradata. When we try to creating a
table in Teradata, Teradata will look whether primary index specified. If the index is not specified,
secondly it will look for Primary key constraint to make the primary index.
If you have not specified primary index or primary constraints then Teradata always
take first column as a primary index. It’s always good to provide
primary index while creating a table as its helps Teradata to spread the data
on all the AMP’s.
CREATE MULTISET
TABLE EMPLOYEE
(
EMPNO INT,
EMPNAME
VARCHAR(500)
DEPT VARCHAR(20)
)
PRIMARY INDEX(EMPNO);
please note:- Above we have created multiset table.
Read Also:-