Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

alter table 1

Status
Not open for further replies.

Chids

MIS
Dec 30, 2003
6
US
hi I have created a table with empno,name,city and dept no with empno as primary index.Then I tried to alter the table to make empno as primary key.
I got a error message saying" already one index in the order is existing'.Why is it so.can't we make the same column as Index and primary key.
can some one throw some light!
Regards--------Chids
 
When you try to add a primary key constraint, teradata tries to create a unique secondary index. Since the column that you chose for the primary key is the same as the column chosen for the unique primary index, you get this error msg saying "already one index in the order is existing".
The primary key constraint is automatically enforced in this case.

If you still want to have a primary key constraint on this column, you will need to recreate the table without specifying the PI. Teradata will automatically chose the primary key column as the Primary index column.

Hope this helps.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top