Click Here To Get Amazing Facebook Profile Covers,Status Messages

Problem in creating primary key in SQL Server

No replies
screwu's picture
screwu
User offline. Last seen 2 years 33 weeks ago. Offline
Joined: 10/02/2009

I was tring to set one column as primary key for my table h_emp_m which already have records but while creating it i encountered the following error.I think it is because of duplicate values for that column.If it is because of duplicate values then how can i remove duplicate values from my table.


- Unable to create index 'PK_H_EMP_M'.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]CREATE UNIQUE INDEX terminated because a duplicate key was found for index ID 1. Most significant primary key is '001221'.
[Microsoft][ODBC SQL Server Driver][SQL Server]Could not create constraint. See previous errors.
[Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated.