Cannot create nonunique clustered index on view '' because
only unique clustered indexes are allowed. Consider creating unique clustered index
instead.
We cannot create
the non-unique clustered index on view.
That is we must have to create clustered index using UNIQUE keyword. If we will
create index like
CREATE CLUSTERED INDEX
CI_ViewStu
ON dbo.view_StuInfo(RollNo)
We will get
error message:
Cannot create
nonunique clustered index on view 'dbo.view_StuInfo' because only unique clustered
indexes are allowed. Consider creating unique clustered index instead.
Solution:
CREATE UNIQUE CLUSTERED INDEX
CI_ViewStu
ON dbo.view_StuInfo(RollNo)
No comments:
Post a Comment