ABOUT PRIMARY and SECONDARY INDEX

Tools
Enthusiast

ABOUT PRIMARY and SECONDARY INDEX

Hi,
Can anyone tel me ,

can i careate the Secondray Index on Primary Indexing Columns ?
2 REPLIES
Teradata Employee

Re: ABOUT PRIMARY and SECONDARY INDEX

Hello,

No you can't, doing so will raise an error "Two indexes with the same columns". Following are couple of examples:

CREATE TABLE Table1 (Col1 INTEGER, Col2 INTEGER) UNIQUE PRIMARY INDEX (Col1), INDEX (Col1);
CREATE TABLE Table1 (Col1 INTEGER, Col2 INTEGER) PRIMARY INDEX (Col1), INDEX (Col1);

Regards,

Adeel
Enthusiast

Re: ABOUT PRIMARY and SECONDARY INDEX

you can use Partition Primary Index (PPI)