Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Generate ColumnStore Index through tsql

$
0
0

I am using partition switching for data retention. I would like to truncate the staging table, but the table has a column store index so I need to drop and recreate that columnstore index. Does anyone have a script to dynamically generate the create index for columnstore indexes? I suppose I could just get a list of all columns in the table and generate it based on those columns, but wanted to script the index as it currently is (in case not all columns are on the index).


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>