All Forums Database
sai_666 7 posts Joined 03/13
04 Mar 2013
DIFF BETWEEN PRIMARY KEY AND PRIMARY INDEX

hI,

iam new to teradata . So please tell me the diff between primary key and primary index.

Regards,
Sai

barani_sachin 141 posts Joined 01/12
04 Mar 2013

Using Primary Index Teradata distributes the data in it's AMP's.
Primary Key is an logical concept used by all the RDBMS, and it helps to uniquely identify each record in a Table.

KS42982 137 posts Joined 12/12
04 Mar 2013

If you are absolutely looking for the differences then below are few -

PRIMARY KEY PRIMARY INDEX

1 It cannot be NULL It can be NULL
2 It is not mandatory in Teradata It is mandatory in Teradata
3 It does not help in data distribution It helps in data distribution
4 It has to be unique It can be unique or non-unique
5 It is logical implementation It is physical implementation
6 It cannot be changed It can be changed.

KS42982 137 posts Joined 12/12
04 Mar 2013

Sorry about the formatting, but not sure, why teradata forum is removing all the lines and spaces today.

devxadmin 6 posts Joined 12/08
04 Mar 2013

@KS42982,

The formatting glitch has been repaired.

KS42982 137 posts Joined 12/12
04 Mar 2013

That's a good news. I am trying again here.

PRIMARY KEY PRIMARY INDEX

1 It cannot be NULL It can be NULL
2 It is not mandatory in Teradata It is mandatory in Teradata
3 It does not help in data distribution It helps in data distribution
4 It has to be unique It can be unique or non-unique
5 It is logical implementation It is physical implementation
6 It cannot be changed It can be changed.

amadu 14 posts Joined 09/14
21 Oct 2014

thanx @KS42982 for your post on the diff between primary key and primary index

Amadu Barrie

You must sign in to leave a comment.