Question

I'm creating a temporary table and would like to create a primary and secondary XML index on a contained xml column within the CREATE TABLE statement since that is the only way I can create an index without throwing an error under snapshot isolation.

I know the syntax for creating standard (non-XML) clustered and nonclustered indexes inline, and it works fine, but I don't seem to be able to find a syntax that works for XML indexes either in documentation or via experimentation.

Does anyone know whether this is possible?

Was it helpful?

Solution

I just tried using the XML index creation commands in-lined with a table creation, and it didn't work.

I stumbled upon this article that makes it look like trying to create non-relational indexes (XML, columnstore, or spatial) doesn't work with in-lining the index creation statement in the table definition.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top