Alter constraints - non-clustered PK -> Clustered PK

  • schleep

    SSChampion

    Points: 12532

    Hi all,

    In SQL 2K (or SQL 2K8), is it possible to programmatically alter the PK constraints on the tables from nonclustered to clustered? When they're referenced by FKs?

    Or do I have to climb all the way down the referential tree, and drop and re-create the PKs from the bottom up?

    We're upgrading to SQL 2K8, and the lack of clustered indexes is becoming apparent.

    Thanks!

    P

  • Jack Corbett

    SSC Guru

    Points: 184361

    Don't think you can do it without dropping all the FK's and then dropping and recreating the PK and then re-adding the FK's

    Jack Corbett
    Consultant - Straight Path Solutions
    Check out these links on how to get faster and more accurate answers:
    Forum Etiquette: How to post data/code on a forum to get the best help
    Need an Answer? Actually, No ... You Need a Question

  • schleep

    SSChampion

    Points: 12532

    Thanks Jack,

    That's what I was afraid of.

    Ah well, it needs doing, so....

    P

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply