Home All Groups Group Topic Archive Search About

altering unique index to primary key

Author
16 Nov 2007 5:52 PM
James
Is there a way to alter a unique clustered index in a table to a primary key
with some magic alter statement?

What I want to avoid (if possible) is to run drop/create statement, just to
make already unique clustered index to a Primary key.
I appreciate your reply. I have sql server 2000 SP4.

Author
16 Nov 2007 9:32 PM
John Bell
Hi James

I don't think this possible with command. Why do you want to change this?

John

Show quoteHide quote
"James" wrote:

> Is there a way to alter a unique clustered index in a table to a primary key
> with some magic alter statement?
>
> What I want to avoid (if possible) is to run drop/create statement, just to
> make already unique clustered index to a Primary key.
> I appreciate your reply. I have sql server 2000 SP4.
>
>
>
Are all your drivers up to date? click for free checkup

Author
19 Nov 2007 3:07 PM
James
I wanted to replicate these tables via Transactional replication and it
requires a Primary key. Since the tables are big, I wanted to save some time
if that was possible.

Show quoteHide quote
"John Bell" <jbellnewspo***@hotmail.com> wrote in message
news:F688407C-5A69-4B1E-B0E7-76100DE23F5E@microsoft.com...
> Hi James
>
> I don't think this possible with command. Why do you want to change this?
>
> John
>
> "James" wrote:
>
>> Is there a way to alter a unique clustered index in a table to a primary
>> key
>> with some magic alter statement?
>>
>> What I want to avoid (if possible) is to run drop/create statement, just
>> to
>> make already unique clustered index to a Primary key.
>> I appreciate your reply. I have sql server 2000 SP4.
>>
>>
>>
Author
20 Nov 2007 7:10 AM
Ruud de Koter
Hi James,
> I wanted to replicate these tables via Transactional replication and it
> requires a Primary key.
>

Are you saying you created the tables without a primary key? Is that
something you regularly do?

Ruud de Koter.

Bookmark and Share

Post Thread options