要建立索引的视图的名称。必须使用 SCHEMABINDING 定义视图才能在视图上创建索引例如use pubs
gocreate view v_titles
with SCHEMABINDING
AS
SELECT [title_id], [title], [type], [pub_id], [price], [advance], [royalty], [ytd_sales], [notes], [pubdate]
FROM [dbo].[titles]
gocreate unique clustered index i_test on v_titles( title )
go
gocreate view v_titles
with SCHEMABINDING
AS
SELECT [title_id], [title], [type], [pub_id], [price], [advance], [royalty], [ytd_sales], [notes], [pubdate]
FROM [dbo].[titles]
gocreate unique clustered index i_test on v_titles( title )
go
在向导中建立时出现错误1935无法创建索引,在创建对象中“indexTest”时关闭了下列SET选项“QUOTED_IDENTIFIER"
with SCHEMABINDING
AS....