primary key non clustered index

Chaitanya Kiran 776 Reputation points

I have a table with columns ID, Name, City, State, SSN, Phone. I have created a clustered index on ID column. I created non-clustered index on SSN column. Now, can I create primary key on the SSN column?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,111 questions
0 comments No comments
{count} votes

Accepted answer
  1. AmeliaGu-MSFT 13,961 Reputation points Microsoft Vendor

    Hi ChaitanyaKiran-2787,

    Yes. But please note that A table can contain only one PRIMARY KEY constraint. Any relationships to the existing primary key must be deleted before the new primary key can be created.
    Please check for more details.

    Best Regards,

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Naomi 7,366 Reputation points

    Yes, primary key doesn't have to be clustered, it just has to be unique.

    0 comments No comments