I am familiar with the syntax to create an index inline when declaring a table variable, but I am unable to create an inline spatial index on a geography field in a table variable.
I am trying to create a spatial index, i.e:
CREATE SPATIAL INDEX SDX_xTD_eGeog ON @T ( C1 ) USING GEOGRAPHY_GRID WITH ( GRIDS=(LEVEL_1 = HIGH,LEVEL_2 = HIGH,LEVEL_3 = HIGH,LEVEL_4 = HIGH) , CELLS_PER_OBJECT = 64 , PAD_INDEX = OFF , SORT_IN_TEMPDB = OFF , DROP_EXISTING = OFF , ALLOW_ROW_LOCKS = ON , ALLOW_PAGE_LOCKS = ON ) ;
on a column in a table variable