3>
4> CREATE TABLE dbo.Book(
5> BookID int IDENTITY(1,1) PRIMARY KEY,
6> ISBN char(10) NOT NULL,
7> BookName varchar(250) NOT NULL,
8> AuthorID int NOT NULL,
9> ChapterDESC XML NULL)
10>
11>
12> CREATE PRIMARY XML INDEX idx_XML_Primary_Book_ChapterDESC
13> ON dbo.Book(ChapterDESC)
14> GO
1>
2> CREATE XML INDEX idx_XML_Value_Book_ChapterDESC
3> ON dbo.Book(ChapterDESC)
4> USING XML INDEX idx_XML_Primary_Book_ChapterDESC
5> FOR VALUE
6> GO
1>
2> SELECT name, secondary_type_desc
3> FROM sys.XML_indexes
4> WHERE object_id = OBJECT_ID('dbo.Book')
5>
6> drop table dbo.book
7> GO
name
secondary_type_desc
------------------------------------------------------------------------------------------------------------------------
-------- ------------------------------------------------------------
idx_XML_Primary_Book_ChapterDESC
NULL
idx_XML_Value_Book_ChapterDESC
VALUE
(2 rows affected)