Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Newbie question on creating index
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01243713
Message ID:
01243916
Vues:
24
>>Thank you very much! I get it now. If I may ask you another question please. Now in addition to the Primary key index I want to add an index on two columns and make it Unique. So when I create this index on the expression of two columns and define that this index has to be Unique I get exception when SQL Server tries to save the new index. The exception says that I have some rows have duplicate entries (for this new key). My question is, is looking for these rows and fixing them before creating an index is the only way to deal with this?
>
>Yes, you must be sure you didn't have duplicate values in selected columns. I mean if you choose one column - then that column must not have duplicated values in it. If you choose two or more that every possible combination of the values of these columsn must not have duplicated value.

Thank you very much.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform