• Carolyn Stern (11/19/2009)


    Now I think I discovered that if there is a primary "KEY" defined - and there is, then this becomes a clustered index. That's what I just read.

    By default, when a primary key is created, if there is no existing clustered index on the table, the primary key is enforced by a clustered index. This is only be default, not a requirement

    If this is so, then fine as that is how I would have defined the clustered index, although I might want to change one slightly.

    If you want to change one, drop the primary key (and I would suggest you learn to do this in script as it gives more control than the GUI designer), then create the clustered index that you want, then go back and recreate the primary key.

    Do I even want a primary and then a unique index that is identically defined?

    Highly unlikely. If one is the clustered and one is not then there might be a very occasional reason for doing that, but very unlikely.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass