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 Indexin Object Explorer),it’s totally visible and usable….