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:
01243914
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.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform