Hello Sachin,
When you specify Primary Kay keyword inside create table, Teradata will be default consider as a Unique Primary Index.
So in addition, if you specify another non unique primary index on same column, it will throw an error.
In your case, since name is already being considered as an UPI candidate, you can not define NUPI on same name column.
Executing below sql ddl will create name as an UPI:
CREATE
TABLE
temp4243426
(
name
INT
NOT
NULL
,
name2
INT
NOT
NULL
,
PRIMARY
KEY
(
name
)
)
Regards,
Chinmay Athavale
Hello Sachin,
When you specify Primary Kay keyword inside create table, Teradata will be default consider as a Unique Primary Index.
So in addition, if you specify another non unique primary index on same column, it will throw an error.
In your case, since name is already being considered as an UPI candidate, you can not define NUPI on same name column.
Executing below sql ddl will create name as an UPI:
CREATE
TABLE
temp4243426
(
name
INT
NOT
NULL
,
name2
INT
NOT
NULL
,
PRIMARY
KEY
(
name
)
)
Regards,
Chinmay Athavale