문제

I am using SQL Server 2008 Express. In the DB in question, there is only one schema: dbo.

If I run the following script:

CREATE UNIQUE INDEX IX_ClientSocialTypes_Cover
ON ClientSocialTypes(ClientID, SocialTypeClassID, [Source]) INCLUDE (URLID);

... it executes ok, but I cannot see the index when I go into DB Diagram and view the indexes for this table. Further, the "Includes" field is always grayed out, even when I specify non-clustered index (hence my use of a script).

Any ideas?

도움이 되었습니까?

해결책

Where are you trying to see the index? Did you refresh the database diagram after creating the index?

Update: ok, it seems that in the diagram editor, you cannot define included columns (always grayed out - even in full SSMS, on SQL Server 2008 R2 Dev Edition).

But in the table designer (right-click on (your table name) > Indexes > New Index in Object Explorer),

alt text

it's totally visible and usable....

alt text

다른 팁

Do you see it when you run this query?:

select * 
from sys.indexes
where object_name(object_id) = 'ClientSocialTypes'
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top