I have created a table with system versioning turned on. When I try to create an index on the _history table, and Include a column, a create script is generated with an empty include argument:
create nonclustered index "some_name"
on "some_table_history"
(
"some_table_id",
"some_other_column"
)
include
(
)
Naturally, this gives an error on execution.
Doing the same on the base table gives a correct create script:
create nonclustered index "some_name"
on "some_table"
(
"some_table_id",
"some_other_column"
)
include
(
"some_third_column"
)
Why is an included column not included in the create script?