Dec 30, 2013

Cannot create index on view ''. It does not have a unique clustered index.


Cannot create index on view ''. It does not have a unique clustered index.

We cannot create the non-clustered index on view untill we have not first created the unique clustered index on view. For example:
First create unique clustered index on view:

CREATE UNIQUE CLUSTERED INDEX CI_ViewStu
ON dbo.view_StuInfo(RollNo)

Now we can create any numbers of non-clustered index on view.

CREATE NONCLUSTERED INDEX NCI_ViewStu
ON dbo.view_StuInfo(Age)

No comments:

Post a Comment