Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Newbie question on creating index
Message
General information
Forum:
Microsoft SQL Server
Category:
Database design
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01243713
Message ID:
01243916
Views:
23
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform