snippetsqlMinor
How to get the spatial index in CREATE TO script?
Viewed 0 times
scriptthecreategethowindexspatial
Problem
Is it possible to get the spatial index using the create to script using SQL Server 2012?
When I write out a table using SCRIPT TABLE AS > CREATE TO in Microsoft SQL Server Management Studio 2012, I get the primary key index, but the spatial index does not carry over.
Thank you!
When I write out a table using SCRIPT TABLE AS > CREATE TO in Microsoft SQL Server Management Studio 2012, I get the primary key index, but the spatial index does not carry over.
Thank you!
Solution
The spatial index, as with other objects, have their own
I can't confirm at the moment, but I suspect that the primary key and other constraints come out in the
The
Technet, How to: Generate a Script
script as menus and need to be done separately. This can be done to the clipboard and pasted to the query window generated by the script table as command.I can't confirm at the moment, but I suspect that the primary key and other constraints come out in the
script table as options since the are an integral part of the table definition, whereas indexes are not.The
generate and publish scripts wizard can also be used, but it is a lot of steps if you are just doing a few items.Technet, How to: Generate a Script
Context
StackExchange Database Administrators Q#83613, answer score: 2
Revisions (0)
No revisions yet.